mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix: prevent background worker when main app is running (#22252)
* fix: prevent background worker only when the main app is actively running * handle ref disposals better --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
parent
b33e8abcdd
commit
35b62cd016
15 changed files with 418 additions and 95 deletions
|
|
@ -1,12 +1,17 @@
|
|||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/domain/services/background_worker.service.dart';
|
||||
import 'package:immich_mobile/platform/background_worker_api.g.dart';
|
||||
import 'package:immich_mobile/platform/background_worker_lock_api.g.dart';
|
||||
import 'package:immich_mobile/platform/connectivity_api.g.dart';
|
||||
import 'package:immich_mobile/platform/native_sync_api.g.dart';
|
||||
import 'package:immich_mobile/platform/thumbnail_api.g.dart';
|
||||
|
||||
final backgroundWorkerFgServiceProvider = Provider((_) => BackgroundWorkerFgService(BackgroundWorkerFgHostApi()));
|
||||
|
||||
final backgroundWorkerLockServiceProvider = Provider<BackgroundWorkerLockService>(
|
||||
(_) => BackgroundWorkerLockService(BackgroundWorkerLockApi()),
|
||||
);
|
||||
|
||||
final nativeSyncApiProvider = Provider<NativeSyncApi>((_) => NativeSyncApi());
|
||||
|
||||
final connectivityApiProvider = Provider<ConnectivityApi>((_) => ConnectivityApi());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue