π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Add displayDescription to Collection and refactor GalleryType editing methods
AmanRajSinghMourya08f531992e42
diff --git a/mobile/apps/photos/lib/models/collection/collection.dart b/mobile/apps/photos/lib/models/collection/collection.dartindex 6c369cc02a..c97abac3a7 100644--- a/mobile/apps/photos/lib/models/collection/collection.dart+++ b/mobile/apps/photos/lib/models/collection/collection.dart@@ -127,6 +127,11 @@ class Collection {bool get hasCover => (pubMagicMetadata.coverID ?? 0) > 0;+ String? get displayDescription {+ final description = pubMagicMetadata.description?.trim();+ return description == null || description.isEmpty ? null : description;+ }+// hasSharees returns true if the collection is shared with other ente usersbool get hasSharees => sharees.isNotEmpty;diff --git a/mobile/apps/photos/lib/models/gallery_type.dart b/mobile/apps/photos/lib/models/gallery_type.dartindex 712a05cf0b..9a11c948bf 100644--- a/mobile/apps/photos/lib/models/gallery_type.dart+++ b/mobile/apps/photos/lib/models/gallery_type.dart@@ -383,21 +383,9 @@ extension GalleryAppBarExtn on GalleryType {return false;}- bool canRename() {- if (this == GalleryType.ownedCollection ||- this == GalleryType.quickLink ||- this == GalleryType.hiddenOwnedCollection) {- return true;- }- return false;- }-- bool canSetCover() {- if (this == GalleryType.ownedCollection ||- this == GalleryType.hiddenOwnedCollection) {- return true;- }- return false;+ bool canEditDetails() {+ return this == GalleryType.ownedCollection ||+ this == GalleryType.hiddenOwnedCollection;}bool canArchive() {