Skip to content

armgit / ente

Public Imported from GitHub
0

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

Add description field to CollectionPubMagicMetadata and update JSON serialization

AmanRajSinghMouryaa0ba30731584
diff --git a/mobile/apps/photos/lib/models/metadata/collection_magic.dart b/mobile/apps/photos/lib/models/metadata/collection_magic.dart
index f6b5b0a3cb..1b2fff038d 100644
--- a/mobile/apps/photos/lib/models/metadata/collection_magic.dart
+++ b/mobile/apps/photos/lib/models/metadata/collection_magic.dart
@@ -13,6 +13,8 @@ const muteKey = "mute";
const orderKey = "order";
+const maxAlbumDescriptionLength = 200;
+
class CollectionMagicMetadata {
// 0 -> visible
// 1 -> archived
@@ -68,7 +70,15 @@ class CollectionPubMagicMetadata {
// layout for public link sharing (masonry, grouped, continuous, trip)
String? layout;
- CollectionPubMagicMetadata({this.asc, this.coverID, this.layout});
+ // description shown below the album name
+ String? description;
+
+ CollectionPubMagicMetadata({
+ this.asc,
+ this.coverID,
+ this.layout,
+ this.description,
+ });
Map<String, dynamic> toJson() {
final Map<String, dynamic> result = {"asc": asc ?? false};
@@ -78,6 +88,9 @@ class CollectionPubMagicMetadata {
if (layout != null) {
result["layout"] = layout!;
}
+ if (description != null) {
+ result["albumDescriptionKey"] = description!;
+ }
return result;
}
@@ -92,6 +105,7 @@ class CollectionPubMagicMetadata {
asc: map["asc"] as bool?,
coverID: map["coverID"],
layout: map["layout"] as String? ?? "masonry",
+ description: map["albumDescriptionKey"] as String?,
);
}
}