mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
chore: add sync indicator and better album state management (#20004)
* album list rerendering * sync indicator * sync indicator * fix: lint
This commit is contained in:
parent
137f0d48c0
commit
2e63b9d951
7 changed files with 226 additions and 158 deletions
|
|
@ -1,8 +1,14 @@
|
|||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/domain/utils/background_sync.dart';
|
||||
import 'package:immich_mobile/providers/sync_status.provider.dart';
|
||||
|
||||
final backgroundSyncProvider = Provider<BackgroundSyncManager>((ref) {
|
||||
final manager = BackgroundSyncManager();
|
||||
final syncStatusNotifier = ref.read(syncStatusProvider.notifier);
|
||||
final manager = BackgroundSyncManager(
|
||||
onRemoteSyncStart: syncStatusNotifier.startRemoteSync,
|
||||
onRemoteSyncComplete: syncStatusNotifier.completeRemoteSync,
|
||||
onRemoteSyncError: syncStatusNotifier.errorRemoteSync,
|
||||
);
|
||||
ref.onDispose(manager.cancel);
|
||||
return manager;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue