Fixup Padding and add message about no replies
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
337f6dc5d9
commit
ad52f2e0c8
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "cy",
|
"@@locale": "cy",
|
||||||
"@@last_modified": "2022-07-07T21:07:20+02:00",
|
"@@last_modified": "2022-07-07T22:32:20+02:00",
|
||||||
|
"fileDownloadUnavailable": "This file appears unavailable for download. The sender may have disabled downloads for this file.",
|
||||||
|
"messageNoReplies": "There are no replies to this message.",
|
||||||
"headingReplies": "Replies",
|
"headingReplies": "Replies",
|
||||||
"viewReplies": "View replies to this message",
|
"viewReplies": "View replies to this message",
|
||||||
"restartFileShare": "Start Sharing File",
|
"restartFileShare": "Start Sharing File",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "da",
|
"@@locale": "da",
|
||||||
"@@last_modified": "2022-07-07T21:07:20+02:00",
|
"@@last_modified": "2022-07-07T22:32:20+02:00",
|
||||||
|
"fileDownloadUnavailable": "This file appears unavailable for download. The sender may have disabled downloads for this file.",
|
||||||
|
"messageNoReplies": "There are no replies to this message.",
|
||||||
"headingReplies": "Replies",
|
"headingReplies": "Replies",
|
||||||
"viewReplies": "View replies to this message",
|
"viewReplies": "View replies to this message",
|
||||||
"restartFileShare": "Start Sharing File",
|
"restartFileShare": "Start Sharing File",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "de",
|
"@@locale": "de",
|
||||||
"@@last_modified": "2022-07-07T21:07:20+02:00",
|
"@@last_modified": "2022-07-07T22:32:20+02:00",
|
||||||
|
"fileDownloadUnavailable": "This file appears unavailable for download. The sender may have disabled downloads for this file.",
|
||||||
|
"messageNoReplies": "There are no replies to this message.",
|
||||||
"headingReplies": "Replies",
|
"headingReplies": "Replies",
|
||||||
"viewReplies": "View replies to this message",
|
"viewReplies": "View replies to this message",
|
||||||
"restartFileShare": "Start Sharing File",
|
"restartFileShare": "Start Sharing File",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "el",
|
"@@locale": "el",
|
||||||
"@@last_modified": "2022-07-07T21:07:20+02:00",
|
"@@last_modified": "2022-07-07T22:32:20+02:00",
|
||||||
|
"fileDownloadUnavailable": "This file appears unavailable for download. The sender may have disabled downloads for this file.",
|
||||||
|
"messageNoReplies": "There are no replies to this message.",
|
||||||
"headingReplies": "Replies",
|
"headingReplies": "Replies",
|
||||||
"viewReplies": "View replies to this message",
|
"viewReplies": "View replies to this message",
|
||||||
"restartFileShare": "Start Sharing File",
|
"restartFileShare": "Start Sharing File",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "en",
|
"@@locale": "en",
|
||||||
"@@last_modified": "2022-07-07T21:07:20+02:00",
|
"@@last_modified": "2022-07-07T22:32:20+02:00",
|
||||||
|
"fileDownloadUnavailable": "This file appears unavailable for download. The sender may have disabled downloads for this file.",
|
||||||
|
"messageNoReplies": "There are no replies to this message.",
|
||||||
"headingReplies": "Replies",
|
"headingReplies": "Replies",
|
||||||
"viewReplies": "View replies to this message",
|
"viewReplies": "View replies to this message",
|
||||||
"restartFileShare": "Start Sharing File",
|
"restartFileShare": "Start Sharing File",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "es",
|
"@@locale": "es",
|
||||||
"@@last_modified": "2022-07-07T21:07:20+02:00",
|
"@@last_modified": "2022-07-07T22:32:20+02:00",
|
||||||
|
"fileDownloadUnavailable": "This file appears unavailable for download. The sender may have disabled downloads for this file.",
|
||||||
|
"messageNoReplies": "There are no replies to this message.",
|
||||||
"headingReplies": "Replies",
|
"headingReplies": "Replies",
|
||||||
"viewReplies": "View replies to this message",
|
"viewReplies": "View replies to this message",
|
||||||
"restartFileShare": "Start Sharing File",
|
"restartFileShare": "Start Sharing File",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "fr",
|
"@@locale": "fr",
|
||||||
"@@last_modified": "2022-07-07T21:07:20+02:00",
|
"@@last_modified": "2022-07-07T22:32:20+02:00",
|
||||||
|
"fileDownloadUnavailable": "This file appears unavailable for download. The sender may have disabled downloads for this file.",
|
||||||
|
"messageNoReplies": "There are no replies to this message.",
|
||||||
"headingReplies": "Replies",
|
"headingReplies": "Replies",
|
||||||
"viewReplies": "View replies to this message",
|
"viewReplies": "View replies to this message",
|
||||||
"restartFileShare": "Start Sharing File",
|
"restartFileShare": "Start Sharing File",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "it",
|
"@@locale": "it",
|
||||||
"@@last_modified": "2022-07-07T21:07:20+02:00",
|
"@@last_modified": "2022-07-07T22:32:20+02:00",
|
||||||
|
"fileDownloadUnavailable": "This file appears unavailable for download. The sender may have disabled downloads for this file.",
|
||||||
|
"messageNoReplies": "There are no replies to this message.",
|
||||||
"headingReplies": "Replies",
|
"headingReplies": "Replies",
|
||||||
"viewReplies": "View replies to this message",
|
"viewReplies": "View replies to this message",
|
||||||
"restartFileShare": "Start Sharing File",
|
"restartFileShare": "Start Sharing File",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "lb",
|
"@@locale": "lb",
|
||||||
"@@last_modified": "2022-07-07T21:07:20+02:00",
|
"@@last_modified": "2022-07-07T22:32:20+02:00",
|
||||||
|
"fileDownloadUnavailable": "This file appears unavailable for download. The sender may have disabled downloads for this file.",
|
||||||
|
"messageNoReplies": "There are no replies to this message.",
|
||||||
"headingReplies": "Replies",
|
"headingReplies": "Replies",
|
||||||
"viewReplies": "View replies to this message",
|
"viewReplies": "View replies to this message",
|
||||||
"restartFileShare": "Start Sharing File",
|
"restartFileShare": "Start Sharing File",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "no",
|
"@@locale": "no",
|
||||||
"@@last_modified": "2022-07-07T21:07:20+02:00",
|
"@@last_modified": "2022-07-07T22:32:20+02:00",
|
||||||
|
"fileDownloadUnavailable": "This file appears unavailable for download. The sender may have disabled downloads for this file.",
|
||||||
|
"messageNoReplies": "There are no replies to this message.",
|
||||||
"headingReplies": "Replies",
|
"headingReplies": "Replies",
|
||||||
"viewReplies": "View replies to this message",
|
"viewReplies": "View replies to this message",
|
||||||
"restartFileShare": "Start Sharing File",
|
"restartFileShare": "Start Sharing File",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "pl",
|
"@@locale": "pl",
|
||||||
"@@last_modified": "2022-07-07T21:07:20+02:00",
|
"@@last_modified": "2022-07-07T22:32:20+02:00",
|
||||||
|
"fileDownloadUnavailable": "This file appears unavailable for download. The sender may have disabled downloads for this file.",
|
||||||
|
"messageNoReplies": "There are no replies to this message.",
|
||||||
"headingReplies": "Replies",
|
"headingReplies": "Replies",
|
||||||
"viewReplies": "View replies to this message",
|
"viewReplies": "View replies to this message",
|
||||||
"restartFileShare": "Start Sharing File",
|
"restartFileShare": "Start Sharing File",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "pt",
|
"@@locale": "pt",
|
||||||
"@@last_modified": "2022-07-07T21:07:20+02:00",
|
"@@last_modified": "2022-07-07T22:32:20+02:00",
|
||||||
|
"fileDownloadUnavailable": "This file appears unavailable for download. The sender may have disabled downloads for this file.",
|
||||||
|
"messageNoReplies": "There are no replies to this message.",
|
||||||
"headingReplies": "Replies",
|
"headingReplies": "Replies",
|
||||||
"viewReplies": "View replies to this message",
|
"viewReplies": "View replies to this message",
|
||||||
"restartFileShare": "Start Sharing File",
|
"restartFileShare": "Start Sharing File",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "ro",
|
"@@locale": "ro",
|
||||||
"@@last_modified": "2022-07-07T21:07:20+02:00",
|
"@@last_modified": "2022-07-07T22:32:20+02:00",
|
||||||
|
"fileDownloadUnavailable": "This file appears unavailable for download. The sender may have disabled downloads for this file.",
|
||||||
|
"messageNoReplies": "There are no replies to this message.",
|
||||||
"headingReplies": "Replies",
|
"headingReplies": "Replies",
|
||||||
"viewReplies": "View replies to this message",
|
"viewReplies": "View replies to this message",
|
||||||
"restartFileShare": "Start Sharing File",
|
"restartFileShare": "Start Sharing File",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "ru",
|
"@@locale": "ru",
|
||||||
"@@last_modified": "2022-07-07T21:07:20+02:00",
|
"@@last_modified": "2022-07-07T22:32:20+02:00",
|
||||||
|
"fileDownloadUnavailable": "This file appears unavailable for download. The sender may have disabled downloads for this file.",
|
||||||
|
"messageNoReplies": "There are no replies to this message.",
|
||||||
"headingReplies": "Replies",
|
"headingReplies": "Replies",
|
||||||
"viewReplies": "View replies to this message",
|
"viewReplies": "View replies to this message",
|
||||||
"restartFileShare": "Start Sharing File",
|
"restartFileShare": "Start Sharing File",
|
||||||
|
|
|
@ -111,7 +111,7 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
|
||||||
tooltip: AppLocalizations.of(context)!.viewReplies,
|
tooltip: AppLocalizations.of(context)!.viewReplies,
|
||||||
splashRadius: Material.defaultSplashRadius / 2,
|
splashRadius: Material.defaultSplashRadius / 2,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
modalShowReplies(context, AppLocalizations.of(context)!.headingReplies, settings, pis, cis, borderColor, cache, messageID);
|
modalShowReplies(context, AppLocalizations.of(context)!.headingReplies, AppLocalizations.of(context)!.messageNoReplies, settings, pis, cis, borderColor, cache, messageID);
|
||||||
},
|
},
|
||||||
icon: Icon(Icons.message_rounded, color: Provider.of<Settings>(context).theme.dropShadowColor)));
|
icon: Icon(Icons.message_rounded, color: Provider.of<Settings>(context).theme.dropShadowColor)));
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
|
||||||
Provider.of<AppState>(context, listen: false).selectedIndex = Provider.of<MessageMetadata>(context, listen: false).messageID;
|
Provider.of<AppState>(context, listen: false).selectedIndex = Provider.of<MessageMetadata>(context, listen: false).messageID;
|
||||||
},
|
},
|
||||||
onLongPress: () async {
|
onLongPress: () async {
|
||||||
modalShowReplies(context, AppLocalizations.of(context)!.headingReplies, settings, pis, cis, borderColor, cache, messageID);
|
modalShowReplies(context, AppLocalizations.of(context)!.headingReplies, AppLocalizations.of(context)!.messageNoReplies, settings, pis, cis, borderColor, cache, messageID);
|
||||||
},
|
},
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.all(2),
|
padding: EdgeInsets.all(2),
|
||||||
|
@ -364,7 +364,8 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void modalShowReplies(BuildContext ctx, String replyHeader, Settings settings, ProfileInfoState profile, ContactInfoState cis, Color borderColor, MessageCache cache, int messageID,
|
void modalShowReplies(
|
||||||
|
BuildContext ctx, String replyHeader, String noRepliesText, Settings settings, ProfileInfoState profile, ContactInfoState cis, Color borderColor, MessageCache cache, int messageID,
|
||||||
{bool showImage = true}) {
|
{bool showImage = true}) {
|
||||||
showModalBottomSheet<void>(
|
showModalBottomSheet<void>(
|
||||||
context: ctx,
|
context: ctx,
|
||||||
|
@ -419,7 +420,11 @@ void modalShowReplies(BuildContext ctx, String replyHeader, Settings settings, P
|
||||||
color: settings.theme.mainTextColor,
|
color: settings.theme.mainTextColor,
|
||||||
)));
|
)));
|
||||||
|
|
||||||
withHeader.insert(2, Padding(padding: EdgeInsets.fromLTRB(10.0, 10.0, 2.0, 15.0), child: Text(replyHeader, style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold))));
|
if (replies.isNotEmpty) {
|
||||||
|
withHeader.insert(2, Padding(padding: EdgeInsets.fromLTRB(10.0, 10.0, 2.0, 15.0), child: Text(replyHeader, style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold))));
|
||||||
|
} else {
|
||||||
|
withHeader.insert(2, Padding(padding: EdgeInsets.fromLTRB(10.0, 10.0, 2.0, 15.0), child: Center(child: Text(noRepliesText, style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold)))));
|
||||||
|
}
|
||||||
|
|
||||||
return Scrollbar(
|
return Scrollbar(
|
||||||
isAlwaysShown: true,
|
isAlwaysShown: true,
|
||||||
|
@ -429,10 +434,12 @@ void modalShowReplies(BuildContext ctx, String replyHeader, Settings settings, P
|
||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
minHeight: viewportConstraints.maxHeight,
|
minHeight: viewportConstraints.maxHeight,
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Padding(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
padding: EdgeInsets.symmetric(vertical: 0.0, horizontal: 20.0),
|
||||||
children: withHeader,
|
child: Column(
|
||||||
))));
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: withHeader,
|
||||||
|
)))));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue