π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][photos] Use better names
ashilkndd323e325607
diff --git a/mobile/lib/models/collection/collection.dart b/mobile/lib/models/collection/collection.dartindex 40cf30b5db..ca61a37906 100644--- a/mobile/lib/models/collection/collection.dart+++ b/mobile/lib/models/collection/collection.dart@@ -137,14 +137,14 @@ class Collection {return (owner?.id ?? 0) == userID;}- bool isPublicDownload() {+ bool isDownloadEnabledForPublicLink() {if (publicURLs == null || publicURLs!.isEmpty) {return false;}return publicURLs?.first?.enableDownload ?? true;}- bool isEnableCollect() {+ bool isCollectEnabledForPublicLink() {if (publicURLs == null || publicURLs!.isEmpty) {return false;}diff --git a/mobile/lib/services/collections_service.dart b/mobile/lib/services/collections_service.dartindex b8a551c1df..21f6ac8a50 100644--- a/mobile/lib/services/collections_service.dart+++ b/mobile/lib/services/collections_service.dart@@ -69,7 +69,7 @@ class CollectionsService {final Map<String, EnteFile> _coverCache = <String, EnteFile>{};final Map<int, int> _countCache = <int, int>{};final _cachedPublicAlbumToken = <int, String>{};- final _cachedPublicAlbumJWTToken = <int, String>{};+ final _cachedPublicAlbumJWT = <int, String>{};final _cachedPublicCollectionID = <int>[];CollectionsService._privateConstructor() {@@ -180,7 +180,7 @@ class CollectionsService {cachedDefaultHiddenCollection = null;cachedUncategorizedCollection = null;_cachedPublicAlbumToken.clear();- _cachedPublicAlbumJWTToken.clear();+ _cachedPublicAlbumJWT.clear();_cachedPublicCollectionID.clear();_cachedKeys.clear();}@@ -1122,8 +1122,8 @@ class CollectionsService {}Future<String?> getPublicAlbumTokenJWT(int collectionID) async {- if (_cachedPublicAlbumJWTToken.containsKey(collectionID)) {- return _cachedPublicAlbumJWTToken[collectionID];+ if (_cachedPublicAlbumJWT.containsKey(collectionID)) {+ return _cachedPublicAlbumJWT[collectionID];}return null;}@@ -1133,7 +1133,7 @@ class CollectionsService {}Future<void> setPublicAlbumTokenJWT(int collectionID, String token) async {- _cachedPublicAlbumJWTToken[collectionID] = token;+ _cachedPublicAlbumJWT[collectionID] = token;}Future<Collection> _fromRemoteCollection(diff --git a/mobile/lib/ui/viewer/gallery/gallery_app_bar_widget.dart b/mobile/lib/ui/viewer/gallery/gallery_app_bar_widget.dartindex 3b2593621c..c3b1c5c90d 100644--- a/mobile/lib/ui/viewer/gallery/gallery_app_bar_widget.dart+++ b/mobile/lib/ui/viewer/gallery/gallery_app_bar_widget.dart@@ -559,7 +559,7 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {icon: Icons.delete_sweep_outlined,),if (galleryType == GalleryType.sharedPublicCollection &&- widget.collection!.isPublicDownload())+ widget.collection!.isDownloadEnabledForPublicLink())EntePopupMenuItem("Download album",value: AlbumPopupAction.downloadAlbum,diff --git a/mobile/lib/ui/viewer/gallery/shared_public_collection_page.dart b/mobile/lib/ui/viewer/gallery/shared_public_collection_page.dartindex 165b9f2035..c81967205e 100644--- a/mobile/lib/ui/viewer/gallery/shared_public_collection_page.dart+++ b/mobile/lib/ui/viewer/gallery/shared_public_collection_page.dart@@ -37,8 +37,8 @@ class SharedPublicCollectionPage extends StatelessWidget {Widget build(BuildContext context) {final logger = Logger("SharedPublicCollectionPage");logger.info("Building SharedPublicCollectionPage");- final bool isPublicDownload = c.collection.isPublicDownload();- final bool isisEnableCollect = c.collection.isEnableCollect();+ final bool isPublicDownload = c.collection.isDownloadEnabledForPublicLink();+ final bool isisEnableCollect = c.collection.isCollectEnabledForPublicLink();final List<EnteFile>? initialFiles =c.thumbnail != null ? [c.thumbnail!] : null;final gallery = Gallery(