From 9422359b51ec0410ec86076d612a34b258e85a53 Mon Sep 17 00:00:00 2001 From: Emanuel Bennici Date: Sat, 27 Jan 2024 19:57:51 +0100 Subject: [PATCH] fix(mobile): Fix single element archiving (#6668) --- mobile/lib/shared/providers/asset.provider.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/lib/shared/providers/asset.provider.dart b/mobile/lib/shared/providers/asset.provider.dart index f874a6d5ad..ad163d5cd3 100644 --- a/mobile/lib/shared/providers/asset.provider.dart +++ b/mobile/lib/shared/providers/asset.provider.dart @@ -301,7 +301,7 @@ class AssetNotifier extends StateNotifier { } Future toggleArchive(List assets, [bool? status]) async { - status ??= assets.every((a) => a.isArchived); + status ??= !assets.every((a) => a.isArchived); final newAssets = await _assetService.changeArchiveStatus(assets, status); int i = 0; for (Asset oldAsset in assets) {