π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mobile][photos] reuse Uncategorized cleanup message
r4khulbfeb2416e58e
diff --git a/mobile/apps/photos/lib/ui/actions/collection/collection_sharing_actions.dart b/mobile/apps/photos/lib/ui/actions/collection/collection_sharing_actions.dartindex 3a28d7b52d..9011d99022 100644--- a/mobile/apps/photos/lib/ui/actions/collection/collection_sharing_actions.dart+++ b/mobile/apps/photos/lib/ui/actions/collection/collection_sharing_actions.dart@@ -518,8 +518,7 @@ class CollectionActions {await collectionsService.trashEmptyCollection(collection);}- Future<({int uncategorizedFilesCount, int removedFilesCount})>- removeFromUncatIfPresentInOtherAlbum(+ Future<int> removeFromUncatIfPresentInOtherAlbum(Collection collection,BuildContext bContext,) async {@@ -528,17 +527,9 @@ class CollectionActions {collection.id,);if (!bContext.mounted) {- return (uncategorizedFilesCount: files.length, removedFilesCount: 0);+ return 0;}- final removedFilesCount = await moveFilesFromCurrentCollection(- bContext,- collection,- files,- );- return (- uncategorizedFilesCount: files.length,- removedFilesCount: removedFilesCount,- );+ return await moveFilesFromCurrentCollection(bContext, collection, files);} catch (e, s) {logger.severe("Failed to remove files from uncategorized", e, s);rethrow;diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart b/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dartindex 2f4012fe7f..e3c478db25 100644--- a/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart+++ b/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart@@ -1085,7 +1085,7 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {}Future<void> onCleanUncategorizedClick(BuildContext buildContext) async {- var cleanupResult = (uncategorizedFilesCount: 0, removedFilesCount: 0);+ var removedFilesCount = 0;final actionResult = await showChoiceActionSheet(context,isCritical: true,@@ -1093,7 +1093,7 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {firstButtonLabel: context.strings.confirm,body: context.strings.cleanUncategorizedDescription,firstButtonOnTap: () async {- cleanupResult = await collectionActions+ removedFilesCount = await collectionActions.removeFromUncatIfPresentInOtherAlbum(widget.collection!, context);},);@@ -1102,12 +1102,8 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {if (!buildContext.mounted) return;showShortToast(buildContext,- cleanupResult.removedFilesCount > 0- ? buildContext.strings.removedItems(- count: cleanupResult.removedFilesCount,- )- : cleanupResult.uncategorizedFilesCount == 0- ? buildContext.strings.uncategorizedIsClean+ removedFilesCount > 0+ ? buildContext.strings.removedItems(count: removedFilesCount): buildContext.strings.nothingToCleanUp,);} else if (actionResult.action == ButtonAction.error) {diff --git a/mobile/packages/strings/lib/l10n/arb/strings_en.arb b/mobile/packages/strings/lib/l10n/arb/strings_en.arbindex 17a5718a87..a8aab64e1f 100644--- a/mobile/packages/strings/lib/l10n/arb/strings_en.arb+++ b/mobile/packages/strings/lib/l10n/arb/strings_en.arb@@ -4624,7 +4624,6 @@"unarchiving": "Unarchiving...","unavailableReferralCode": "This code is already taken","uncategorized": "Uncategorized",- "uncategorizedIsClean": "Uncategorized is clean","uncategorizedItemsWillShowUpHere": "Uncategorized items will show up here","undo": "Undo","unhide": "Unhide",