Skip to content

armgit / ente

Public Imported from GitHub
0

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

fix: check if collection not deleted

Prateek Sunal82c8ce3f8660
diff --git a/mobile/apps/photos/lib/models/collection/collection.dart b/mobile/apps/photos/lib/models/collection/collection.dart
index 8d68b73374..35d4a5167a 100644
--- a/mobile/apps/photos/lib/models/collection/collection.dart
+++ b/mobile/apps/photos/lib/models/collection/collection.dart
@@ -140,8 +140,9 @@ class Collection {
}
bool canAutoAdd(int userID) {
- return (owner.id ?? -100) == userID ||
+ final canEditCollection = isOwner(userID) ||
getRole(userID) == CollectionParticipantRole.collaborator;
+ return canEditCollection && !isDeleted;
}
bool isDownloadEnabledForPublicLink() {