Improve bookmarks navigation, scoping, search, and bulk actions
Add Bookmarks to the Contacts overflow menu, open the dedicated BookmarksScreen from direct and channel chat menus with a split scope pill (All vs current chat), add in-screen bookmark search with scroll-and-highlight jump, support bulk bookmarking from channel selection mode and bulk removal in BookmarksScreen, and prompt with a confirmation dialog before removing single or selected bookmarks.
This commit is contained in:
1 parent
d4a6839413
commit
32977bdd50
32 files changed
+1817
-230
No files matched your search
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user