π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Remove redundant future
Neeraj Gupta6b336ed19aea
diff --git a/mobile/lib/services/collections_service.dart b/mobile/lib/services/collections_service.dartindex a9540cb236..5e84acc8d2 100644--- a/mobile/lib/services/collections_service.dart+++ b/mobile/lib/services/collections_service.dart@@ -1180,7 +1180,7 @@ class CollectionsService {String passwordHash,int collectionID,) async {- final authToken = await getSharedPublicAlbumToken(collectionID);+ final authToken = getSharedPublicAlbumToken(collectionID);try {final response = await _enteDio.post("/public-collection/verify-password",@@ -1212,7 +1212,7 @@ class CollectionsService {BuildContext context,int collectionID,) async {- final key = await getSharedPublicAlbumKey(collectionID);+ final key = getSharedPublicAlbumKey(collectionID);if (key.isEmpty) {throw Exception("Collection key not found");}@@ -1234,18 +1234,15 @@ class CollectionsService {);}- Future<String> getSharedPublicAlbumKey(int collectionID) async {+ String getSharedPublicAlbumKey(int collectionID) {if (_cachedPublicAlbumKey.containsKey(collectionID)) {return _cachedPublicAlbumKey[collectionID]!;}return "";}- Future<String?> getSharedPublicAlbumToken(int collectionID) async {- if (_cachedPublicAlbumToken.containsKey(collectionID)) {- return _cachedPublicAlbumToken[collectionID];- }- return null;+ String? getSharedPublicAlbumToken(int collectionID) {+ return _cachedPublicAlbumToken[collectionID];}Map<String, String> publicCollectionHeaders(int collectionID) {diff --git a/mobile/lib/ui/viewer/gallery/gallery_app_bar_widget.dart b/mobile/lib/ui/viewer/gallery/gallery_app_bar_widget.dartindex 3d250ddd3d..38c02c08b9 100644--- a/mobile/lib/ui/viewer/gallery/gallery_app_bar_widget.dart+++ b/mobile/lib/ui/viewer/gallery/gallery_app_bar_widget.dart@@ -851,10 +851,10 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {try {if (galleryType == GalleryType.sharedPublicCollection &&collection!.isCollectEnabledForPublicLink()) {- final authToken = await CollectionsService.instance+ final authToken = CollectionsService.instance.getSharedPublicAlbumToken(collection.id);- final albumKey = await CollectionsService.instance- .getSharedPublicAlbumKey(collection.id);+ final albumKey =+ CollectionsService.instance.getSharedPublicAlbumKey(collection.id);final res = await showChoiceDialog(context,