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:
zjs81 committed 2026-11-23 18:20:19 -07:00
1 parent d4a6839413
commit 32977bdd50
32 files changed
+1817 -230

No files matched your search

+13 -4
View File
@@ -13,11 +13,11 @@ class BookmarkStore {
String get keyFor => '$_keyPrefix$publicKeyHex';
Future<void> _pendingWrites = Future<void>.value();
Future<void>? _pendingWrites;
Future<List<BookmarkedMessage>> loadBookmarks() async {
final writes = _pendingWrites;
await writes;
if (writes != null) await writes;
return _readBookmarks(keyFor);
}
@@ -47,11 +47,20 @@ class BookmarkStore {
}
Future<void> _enqueue(Future<void> Function() operation) {
final next = _pendingWrites.then((_) => operation());
_pendingWrites = next.then<void>(
final previous = _pendingWrites;
final next = previous == null
? Future<void>.sync(operation)
: previous.then((_) => operation());
final completion = next.then<void>(
(_) {},
onError: (Object _, StackTrace _) {},
);
_pendingWrites = completion;
completion.whenComplete(() {
if (identical(_pendingWrites, completion)) {
_pendingWrites = null;
}
});
return next;
}