π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
refactor(photos): rename shared collections and memory links model
AmanRajSinghMourya4160682a96d4
diff --git a/mobile/apps/photos/lib/models/collection/collection_items.dart b/mobile/apps/photos/lib/models/collection/collection_items.dartindex 81526d660b..4d31cc3ef4 100644--- a/mobile/apps/photos/lib/models/collection/collection_items.dart+++ b/mobile/apps/photos/lib/models/collection/collection_items.dart@@ -24,13 +24,13 @@ class SharedCollections {}}-class SharedCollectionsWithMemoryLinks {+class SharedCollectionsAndMemoryLinks {final SharedCollections collections;final List<MemoryShare> memoryLinks;- SharedCollectionsWithMemoryLinks(this.collections, this.memoryLinks);+ SharedCollectionsAndMemoryLinks(this.collections, this.memoryLinks);- static SharedCollectionsWithMemoryLinks empty() {- return SharedCollectionsWithMemoryLinks(SharedCollections.empty(), []);+ static SharedCollectionsAndMemoryLinks empty() {+ return SharedCollectionsAndMemoryLinks(SharedCollections.empty(), []);}}diff --git a/mobile/apps/photos/lib/services/collections_service.dart b/mobile/apps/photos/lib/services/collections_service.dartindex c02d57a507..0cf43e6de5 100644--- a/mobile/apps/photos/lib/services/collections_service.dart+++ b/mobile/apps/photos/lib/services/collections_service.dart@@ -610,15 +610,15 @@ class CollectionsService {return SharedCollections(outgoing, incoming, quickLinks);}- Future<SharedCollectionsWithMemoryLinks>- getSharedCollectionsWithMemoryLinks() async {+ Future<SharedCollectionsAndMemoryLinks>+ getSharedCollectionsAndMemoryLinks() async {final collections = await getSharedCollections();try {final memoryLinks = await MemoryShareService.instance.listMemoryShares();- return SharedCollectionsWithMemoryLinks(collections, memoryLinks);+ return SharedCollectionsAndMemoryLinks(collections, memoryLinks);} catch (e, s) {_logger.severe("failed to load memory links", e, s);- return SharedCollectionsWithMemoryLinks(collections, []);+ return SharedCollectionsAndMemoryLinks(collections, []);}}diff --git a/mobile/apps/photos/lib/ui/tabs/shared_collections_tab.dart b/mobile/apps/photos/lib/ui/tabs/shared_collections_tab.dartindex cee6f4942c..cc3638f772 100644--- a/mobile/apps/photos/lib/ui/tabs/shared_collections_tab.dart+++ b/mobile/apps/photos/lib/ui/tabs/shared_collections_tab.dart@@ -200,10 +200,10 @@ class _SharedCollectionsTabState extends State<SharedCollectionsTab>super.build(context);final bool offlineUiMode =isOfflineMode && !Configuration.instance.hasConfiguredAccount();- return FutureBuilder<SharedCollectionsWithMemoryLinks>(+ return FutureBuilder<SharedCollectionsAndMemoryLinks>(future: offlineUiMode- ? Future.value(SharedCollectionsWithMemoryLinks.empty())- : CollectionsService.instance.getSharedCollectionsWithMemoryLinks(),+ ? Future.value(SharedCollectionsAndMemoryLinks.empty())+ : CollectionsService.instance.getSharedCollectionsAndMemoryLinks(),builder: (context, snapshot) {if (snapshot.hasData) {final data = snapshot.data!;