Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob][locker] Clear deleted collection selections (#14086)

aman-pilot0d02654f6dd9
diff --git a/mobile/apps/locker/changes/deleted-collection-selection.md b/mobile/apps/locker/changes/deleted-collection-selection.md
new file mode 100644
index 0000000000..476658a551
--- /dev/null
+++ b/mobile/apps/locker/changes/deleted-collection-selection.md
@@ -0,0 +1 @@
+- Fixed deleted collections remaining selected.
diff --git a/mobile/apps/locker/lib/ui/pages/all_collections_page.dart b/mobile/apps/locker/lib/ui/pages/all_collections_page.dart
index 8dd5b382f6..0d63a3e667 100644
--- a/mobile/apps/locker/lib/ui/pages/all_collections_page.dart
+++ b/mobile/apps/locker/lib/ui/pages/all_collections_page.dart
@@ -88,6 +88,12 @@ class _AllCollectionsPageState extends State<AllCollectionsPage> {
_uncategorizedCollection = uncategorized;
if (mounted) {
+ final collectionIds = collections.map((c) => c.id).toSet();
+ for (final selected in _selectedCollections.collections.toList()) {
+ if (!collectionIds.contains(selected.id)) {
+ _selectedCollections.toggleSelection(selected);
+ }
+ }
if (showLoading) {
setState(() {
_isLoading = false;