Merge upstream dev into settings-actions-feedback

Conflicts came from #708 (merged) also being in this branch; this
branch's versions of settings_screen.dart, settings_pages_test.dart and
settings.md already include it. design.md takes dev's wording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
celsoazevedoandClaude Opus 5.5 committed 2026-11-24 07:01:24 +00:00
commit e19316512e
40 files changed
+2566 -482

No files matched your search

+39
View File
@@ -219,3 +219,42 @@ Future<bool> confirmClearChat(
);
return confirmed == true;
}
/// Asks before removing [count] bookmarked messages.
Future<bool> confirmRemoveBookmarks(
BuildContext context, {
int count = 1,
}) async {
final confirmed = await showDialog<bool>(
context: context,
builder: (dialogContext) {
final l10n = dialogContext.l10n;
return AlertDialog(
title: Text(
count == 1
? l10n.bookmarks_removeConfirmTitle
: l10n.bookmarks_removeSelectedConfirmTitle,
),
content: Text(
count == 1
? l10n.bookmarks_removeConfirmMessage
: l10n.bookmarks_removeSelectedConfirmMessage(count),
),
actions: [
TextButton(
onPressed: () => Navigator.pop(dialogContext, false),
child: Text(l10n.common_cancel),
),
TextButton(
onPressed: () => Navigator.pop(dialogContext, true),
style: TextButton.styleFrom(
foregroundColor: Theme.of(dialogContext).colorScheme.error,
),
child: Text(l10n.common_remove),
),
],
);
},
);
return confirmed == true;
}
@@ -10,6 +10,7 @@ class TranslatedMessageContent extends StatelessWidget {
final Color? backgroundColor;
final bool showOriginalFirst;
final VoidCallback? onSecondaryTap;
final bool selectable;
const TranslatedMessageContent({
super.key,
@@ -20,6 +21,7 @@ class TranslatedMessageContent extends StatelessWidget {
this.backgroundColor,
this.showOriginalFirst = true,
this.onSecondaryTap,
this.selectable = true,
});
@override
@@ -42,6 +44,7 @@ class TranslatedMessageContent extends StatelessWidget {
),
backgroundColor: backgroundColor,
onSecondaryTap: onSecondaryTap,
selectable: selectable,
)
: null;
final translatedWidget = LinkHandler.buildLinkifyText(
@@ -50,6 +53,7 @@ class TranslatedMessageContent extends StatelessWidget {
style: style,
backgroundColor: backgroundColor,
onSecondaryTap: onSecondaryTap,
selectable: selectable,
);
if (!shouldShowOriginal) {