Skip to content

High performance self-hosted photo and video management solution.

fix(mobile): delete from device warning shows incorrectly (#23935)

Yaroseeee5147cc92
diff --git a/mobile/lib/providers/infrastructure/action.provider.dart b/mobile/lib/providers/infrastructure/action.provider.dart
index 9467f63483..659bd05db9 100644
--- a/mobile/lib/providers/infrastructure/action.provider.dart
+++ b/mobile/lib/providers/infrastructure/action.provider.dart
@@ -264,9 +264,8 @@ class ActionNotifier extends Notifier<void> {
}
Future<ActionResult?> deleteLocal(ActionSource source, BuildContext context) async {
- // Always perform the operation if there is only one merged asset
final assets = _getAssets(source);
- bool? backedUpOnly = assets.length == 1 && assets.first.storage == AssetState.merged
+ bool? backedUpOnly = assets.every((asset) => asset.storage == AssetState.merged)
? true
: await showDialog<bool>(
context: context,