π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Throw when folder mapping is missing for skip toast
ashilknd2e31c6650ad
diff --git a/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart b/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dartindex 9e1abf5db8..2e8ea25cdf 100644--- a/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart+++ b/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart@@ -1106,10 +1106,7 @@ class _FileSelectionActionsWidgetStatefinal l10n = AppLocalizations.of(context);final existingLocalFolderNames = await Future.wait(files.map(- (file) => getExistingLocalFolderNameForDownloadSkipToast(- file,- fallbackFolderName: l10n.gallery,- ),+ (file) => getExistingLocalFolderNameForDownloadSkipToast(file),),);diff --git a/mobile/apps/photos/lib/ui/viewer/file/file_app_bar.dart b/mobile/apps/photos/lib/ui/viewer/file/file_app_bar.dartindex 7689e4433e..9ea7f716d3 100644--- a/mobile/apps/photos/lib/ui/viewer/file/file_app_bar.dart+++ b/mobile/apps/photos/lib/ui/viewer/file/file_app_bar.dart@@ -620,10 +620,7 @@ class FileAppBarState extends State<FileAppBar> {Future<void> _download(EnteFile file) async {final existingFolderName =- await getExistingLocalFolderNameForDownloadSkipToast(- file,- fallbackFolderName: AppLocalizations.of(context).gallery,- );+ await getExistingLocalFolderNameForDownloadSkipToast(file);if (existingFolderName != null) {if (mounted) {final l10n = AppLocalizations.of(context);diff --git a/mobile/apps/photos/lib/utils/download_skip_toast_util.dart b/mobile/apps/photos/lib/utils/download_skip_toast_util.dartindex 60888f34c3..469cbc17ba 100644--- a/mobile/apps/photos/lib/utils/download_skip_toast_util.dart+++ b/mobile/apps/photos/lib/utils/download_skip_toast_util.dart@@ -16,9 +16,8 @@ String getDownloadSkipToastFileName(}Future<String?> getExistingLocalFolderNameForDownloadSkipToast(- EnteFile file, {- required String fallbackFolderName,-}) async {+ EnteFile file,+) async {if (file.localID == null) {return null;}@@ -31,5 +30,8 @@ Future<String?> getExistingLocalFolderNameForDownloadSkipToast(if (folderNames.isNotEmpty) {return folderNames.last;}- return fallbackFolderName;+ throw StateError(+ "Expected non-empty device collection name for localID=${file.localID}, "+ "but found none.",+ );}