trunk #2

Merged
Guido merged 229 commits from cwtch.im/cwtch-ui:trunk into trunk 2023-04-16 14:29:14 +00:00
15 changed files with 57 additions and 22 deletions
Showing only changes of commit ad52f2e0c8 - Show all commits

View File

@ -1,6 +1,8 @@
{
"@@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",
"viewReplies": "View replies to this message",
"restartFileShare": "Start Sharing File",

View File

@ -1,6 +1,8 @@
{
"@@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",
"viewReplies": "View replies to this message",
"restartFileShare": "Start Sharing File",

View File

@ -1,6 +1,8 @@
{
"@@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",
"viewReplies": "View replies to this message",
"restartFileShare": "Start Sharing File",

View File

@ -1,6 +1,8 @@
{
"@@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",
"viewReplies": "View replies to this message",
"restartFileShare": "Start Sharing File",

View File

@ -1,6 +1,8 @@
{
"@@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",
"viewReplies": "View replies to this message",
"restartFileShare": "Start Sharing File",

View File

@ -1,6 +1,8 @@
{
"@@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",
"viewReplies": "View replies to this message",
"restartFileShare": "Start Sharing File",

View File

@ -1,6 +1,8 @@
{
"@@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",
"viewReplies": "View replies to this message",
"restartFileShare": "Start Sharing File",

View File

@ -1,6 +1,8 @@
{
"@@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",
"viewReplies": "View replies to this message",
"restartFileShare": "Start Sharing File",

View File

@ -1,6 +1,8 @@
{
"@@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",
"viewReplies": "View replies to this message",
"restartFileShare": "Start Sharing File",

View File

@ -1,6 +1,8 @@
{
"@@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",
"viewReplies": "View replies to this message",
"restartFileShare": "Start Sharing File",

View File

@ -1,6 +1,8 @@
{
"@@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",
"viewReplies": "View replies to this message",
"restartFileShare": "Start Sharing File",

View File

@ -1,6 +1,8 @@
{
"@@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",
"viewReplies": "View replies to this message",
"restartFileShare": "Start Sharing File",

View File

@ -1,6 +1,8 @@
{
"@@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",
"viewReplies": "View replies to this message",
"restartFileShare": "Start Sharing File",

View File

@ -1,6 +1,8 @@
{
"@@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",
"viewReplies": "View replies to this message",
"restartFileShare": "Start Sharing File",

View File

@ -111,7 +111,7 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
tooltip: AppLocalizations.of(context)!.viewReplies,
splashRadius: Material.defaultSplashRadius / 2,
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)));
@ -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;
},
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(
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}) {
showModalBottomSheet<void>(
context: ctx,
@ -419,7 +420,11 @@ void modalShowReplies(BuildContext ctx, String replyHeader, Settings settings, P
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(
isAlwaysShown: true,
@ -429,10 +434,12 @@ void modalShowReplies(BuildContext ctx, String replyHeader, Settings settings, P
constraints: BoxConstraints(
minHeight: viewportConstraints.maxHeight,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: withHeader,
))));
child: Padding(
padding: EdgeInsets.symmetric(vertical: 0.0, horizontal: 20.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: withHeader,
)))));
});
});
}