π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Make isArchived() ownership-aware like isHidden()
ashilkn5aaf0357bfa9
diff --git a/mobile/apps/photos/lib/models/collection/collection.dart b/mobile/apps/photos/lib/models/collection/collection.dartindex aa67c6ddfb..fd356da637 100644--- a/mobile/apps/photos/lib/models/collection/collection.dart+++ b/mobile/apps/photos/lib/models/collection/collection.dart@@ -97,7 +97,12 @@ class Collection {});bool isArchived() {- return mMdVersion > 0 && magicMetadata.visibility == archiveVisibility;+ final userID = Configuration.instance.getUserID();+ if (userID != null && isOwner(userID)) {+ return mMdVersion > 0 && magicMetadata.visibility == archiveVisibility;+ } else {+ return hasShareeArchived();+ }}bool hasShareeArchived() {diff --git a/mobile/apps/photos/lib/services/collections_service.dart b/mobile/apps/photos/lib/services/collections_service.dartindex 3dbdd0a292..62db9fefe8 100644--- a/mobile/apps/photos/lib/services/collections_service.dart+++ b/mobile/apps/photos/lib/services/collections_service.dart@@ -350,9 +350,7 @@ class CollectionsService {Set<int> archivedOrHiddenCollectionIds() {return _collectionIDToCollections.values- .where(- (c) => c.hasShareeArchived() || c.isHidden() || c.isArchived(),- )+ .where((c) => c.isArchived() || c.isHidden()).map((e) => e.id).toSet();}