Skip to content

armgit / ente

Public Imported from GitHub
0

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

[collections] Exclude deleted collections from target collection retrieval

AmanRajSinghMourya7507be52c71d
diff --git a/mobile/apps/locker/lib/services/collections/collections_service.dart b/mobile/apps/locker/lib/services/collections/collections_service.dart
index 4aa2c934e1..55ca3c1634 100644
--- a/mobile/apps/locker/lib/services/collections/collections_service.dart
+++ b/mobile/apps/locker/lib/services/collections/collections_service.dart
@@ -724,9 +724,10 @@ class CollectionService {
}
final Collection? targetCollection =
await getCollectionByID(toCollectionID);
- // ignore non-cached collections, uncategorized and favorite
- // collections and collections ignored by others
+ // ignore non-cached, deleted, uncategorized and favorite collections,
+ // and collections ignored by others
if (targetCollection == null ||
+ targetCollection.isDeleted ||
(CollectionType.uncategorized == targetCollection.type ||
targetCollection.type == CollectionType.favorites) ||
targetCollection.owner.id != userID) {