chore(mobile): Revert "remove exclude album mechanism for backup (#10552)" (#10686)

Revert "chore(mobile): remove exclude album mechanism for backup (#10552)"

This reverts commit 5f47cf604a.
This commit is contained in:
Alex
2024-06-29 11:30:18 -05:00
committed by GitHub
parent 8f553ddb39
commit 887acb9d9f
12 changed files with 309 additions and 32 deletions

View File

@@ -349,6 +349,7 @@ class BackgroundService {
AppSettingsService settingsService = AppSettingsService();
final selectedAlbums = backupService.selectedAlbumsQuery().findAllSync();
final excludedAlbums = backupService.excludedAlbumsQuery().findAllSync();
if (selectedAlbums.isEmpty) {
return true;
}
@@ -360,10 +361,11 @@ class BackgroundService {
backupService,
settingsService,
selectedAlbums,
excludedAlbums,
);
if (backupOk) {
await Store.delete(StoreKey.backupFailedSince);
final backupAlbums = [...selectedAlbums];
final backupAlbums = [...selectedAlbums, ...excludedAlbums];
backupAlbums.sortBy((e) => e.id);
db.writeTxnSync(() {
final dbAlbums = db.backupAlbums.where().sortById().findAllSync();
@@ -402,6 +404,7 @@ class BackgroundService {
BackupService backupService,
AppSettingsService settingsService,
List<BackupAlbum> selectedAlbums,
List<BackupAlbum> excludedAlbums,
) async {
_errorGracePeriodExceeded = _isErrorGracePeriodExceeded(settingsService);
final bool notifyTotalProgress = settingsService
@@ -415,6 +418,7 @@ class BackgroundService {
List<AssetEntity> toUpload = await backupService.buildUploadCandidates(
selectedAlbums,
excludedAlbums,
);
try {