immich/mobile/pigeon/background_worker_lock_api.dart
shenlong 35b62cd016
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>
2025-09-21 20:45:47 -05:00

18 lines
506 B
Dart

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();
}