mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-04 03:27:09 -05:00 
			
		
		
		
	* show beta sync stats * show status next to jobs * use drift devtools reset database impl * dcm fixes * fix: hash count * styling --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
		
			
				
	
	
		
			21 lines
		
	
	
		
			953 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			953 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
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 syncStatusNotifier = ref.read(syncStatusProvider.notifier);
 | 
						|
  final manager = BackgroundSyncManager(
 | 
						|
    onRemoteSyncStart: syncStatusNotifier.startRemoteSync,
 | 
						|
    onRemoteSyncComplete: syncStatusNotifier.completeRemoteSync,
 | 
						|
    onRemoteSyncError: syncStatusNotifier.errorRemoteSync,
 | 
						|
    onLocalSyncStart: syncStatusNotifier.startLocalSync,
 | 
						|
    onLocalSyncComplete: syncStatusNotifier.completeLocalSync,
 | 
						|
    onLocalSyncError: syncStatusNotifier.errorLocalSync,
 | 
						|
    onHashingStart: syncStatusNotifier.startHashJob,
 | 
						|
    onHashingComplete: syncStatusNotifier.completeHashJob,
 | 
						|
    onHashingError: syncStatusNotifier.errorHashJob,
 | 
						|
  );
 | 
						|
  ref.onDispose(manager.cancel);
 | 
						|
  return manager;
 | 
						|
});
 |