mirror of
https://github.com/immich-app/immich.git
synced 2025-01-01 08:31:59 +00:00
fix(mobile): allow select empty album as backup album (#9290)
This commit is contained in:
parent
bbb9453e1a
commit
7520ffd6c3
1 changed files with 14 additions and 2 deletions
|
@ -294,17 +294,29 @@ class BackupNotifier extends StateNotifier<BackUpState> {
|
||||||
final Set<AssetEntity> assetsFromExcludedAlbums = {};
|
final Set<AssetEntity> assetsFromExcludedAlbums = {};
|
||||||
|
|
||||||
for (final album in state.selectedBackupAlbums) {
|
for (final album in state.selectedBackupAlbums) {
|
||||||
|
final assetCount = await album.albumEntity.assetCountAsync;
|
||||||
|
|
||||||
|
if (assetCount == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
final assets = await album.albumEntity.getAssetListRange(
|
final assets = await album.albumEntity.getAssetListRange(
|
||||||
start: 0,
|
start: 0,
|
||||||
end: await album.albumEntity.assetCountAsync,
|
end: assetCount,
|
||||||
);
|
);
|
||||||
assetsFromSelectedAlbums.addAll(assets);
|
assetsFromSelectedAlbums.addAll(assets);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (final album in state.excludedBackupAlbums) {
|
for (final album in state.excludedBackupAlbums) {
|
||||||
|
final assetCount = await album.albumEntity.assetCountAsync;
|
||||||
|
|
||||||
|
if (assetCount == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
final assets = await album.albumEntity.getAssetListRange(
|
final assets = await album.albumEntity.getAssetListRange(
|
||||||
start: 0,
|
start: 0,
|
||||||
end: await album.albumEntity.assetCountAsync,
|
end: assetCount,
|
||||||
);
|
);
|
||||||
assetsFromExcludedAlbums.addAll(assets);
|
assetsFromExcludedAlbums.addAll(assets);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue