1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-29 15:11:58 +00:00

fix(mobile): allow select empty album as backup album (#9290)

This commit is contained in:
Alex 2024-05-06 23:00:52 -05:00 committed by GitHub
parent bbb9453e1a
commit 7520ffd6c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -294,17 +294,29 @@ class BackupNotifier extends StateNotifier<BackUpState> {
final Set<AssetEntity> assetsFromExcludedAlbums = {};
for (final album in state.selectedBackupAlbums) {
final assetCount = await album.albumEntity.assetCountAsync;
if (assetCount == 0) {
continue;
}
final assets = await album.albumEntity.getAssetListRange(
start: 0,
end: await album.albumEntity.assetCountAsync,
end: assetCount,
);
assetsFromSelectedAlbums.addAll(assets);
}
for (final album in state.excludedBackupAlbums) {
final assetCount = await album.albumEntity.assetCountAsync;
if (assetCount == 0) {
continue;
}
final assets = await album.albumEntity.getAssetListRange(
start: 0,
end: await album.albumEntity.assetCountAsync,
end: assetCount,
);
assetsFromExcludedAlbums.addAll(assets);
}