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
17
mobile/pigeon/background_worker_lock_api.dart
Normal file
17
mobile/pigeon/background_worker_lock_api.dart
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import 'package:pigeon/pigeon.dart';
|
||||
|
||||
@ConfigurePigeon(
|
||||
PigeonOptions(
|
||||
dartOut: 'lib/platform/background_worker_lock_api.g.dart',
|
||||
kotlinOut: 'android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorkerLock.g.kt',
|
||||
kotlinOptions: KotlinOptions(package: 'app.alextran.immich.background', includeErrorClass: false),
|
||||
dartOptions: DartOptions(),
|
||||
dartPackageName: 'immich_mobile',
|
||||
),
|
||||
)
|
||||
@HostApi()
|
||||
abstract class BackgroundWorkerLockApi {
|
||||
void lock();
|
||||
|
||||
void unlock();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue