mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(mobile): new sync (#16556)
* feat(mobile): new sync * refactor * refactor * refactor * refactor * refactor * refactor * update analysis option * remove database operation * pr feedback
This commit is contained in:
parent
2875303b4c
commit
1ed1a0a1fc
7 changed files with 216 additions and 0 deletions
|
|
@ -0,0 +1,24 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/domain/services/sync_stream.service.dart';
|
||||
import 'package:immich_mobile/infrastructure/repositories/sync_api.repository.dart';
|
||||
import 'package:immich_mobile/providers/api.provider.dart';
|
||||
|
||||
final syncStreamServiceProvider = Provider(
|
||||
(ref) {
|
||||
final instance = SyncStreamService(
|
||||
ref.watch(syncApiRepositoryProvider),
|
||||
);
|
||||
|
||||
ref.onDispose(() => unawaited(instance.dispose()));
|
||||
|
||||
return instance;
|
||||
},
|
||||
);
|
||||
|
||||
final syncApiRepositoryProvider = Provider(
|
||||
(ref) => SyncApiRepository(
|
||||
ref.watch(apiServiceProvider),
|
||||
),
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue