mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
feat: album info sync (#21103)
* wip * album creation * fix: album api repository no invalidating after logging out * add linkedRemoteAlbumId column and migration * link/unlink remote album * logic to find and add new assets to album * pr feedback * add toggle option to backup option page * refactor: provider > service * rename * Handle page pop manually * UI feedback for user creation and sync linked album * uncomment migration * remove unused method
This commit is contained in:
parent
538263dc38
commit
bcfb5bee1f
26 changed files with 8021 additions and 268 deletions
|
|
@ -23,8 +23,10 @@ import 'package:immich_mobile/infrastructure/entities/store.entity.dart';
|
|||
import 'package:immich_mobile/infrastructure/entities/store.entity.drift.dart';
|
||||
import 'package:immich_mobile/infrastructure/entities/user.entity.dart';
|
||||
import 'package:immich_mobile/infrastructure/repositories/db.repository.dart';
|
||||
import 'package:immich_mobile/providers/app_settings.provider.dart';
|
||||
import 'package:immich_mobile/providers/background_sync.provider.dart';
|
||||
import 'package:immich_mobile/providers/backup/backup.provider.dart';
|
||||
import 'package:immich_mobile/services/app_settings.service.dart';
|
||||
import 'package:immich_mobile/utils/diff.dart';
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
|
|
@ -268,11 +270,17 @@ Future<List<void>> runNewSync(WidgetRef ref, {bool full = false}) {
|
|||
ref.read(backupProvider.notifier).cancelBackup();
|
||||
|
||||
final backgroundManager = ref.read(backgroundSyncProvider);
|
||||
final isAlbumLinkedSyncEnable = ref.read(appSettingsServiceProvider).getSetting(AppSettingsEnum.syncAlbums);
|
||||
|
||||
return Future.wait([
|
||||
backgroundManager.syncLocal(full: full).then((_) {
|
||||
Logger("runNewSync").fine("Hashing assets after syncLocal");
|
||||
return backgroundManager.hashAssets();
|
||||
}),
|
||||
backgroundManager.syncRemote(),
|
||||
backgroundManager.syncRemote().then((_) {
|
||||
if (isAlbumLinkedSyncEnable) {
|
||||
return backgroundManager.syncLinkedAlbum();
|
||||
}
|
||||
}),
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue