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

fix(mobile): delete warning on multiple assets
This commit is contained in:
Yaros
2025-11-17 17:17:04 +01:00
committed by GitHub
parent af22f9b014
commit eeee5147cc

View File

@@ -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,