diff --git a/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/MyCameraImpl.kt b/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/MyCameraImpl.kt index 60760b2..b69e3a0 100644 --- a/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/MyCameraImpl.kt +++ b/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/MyCameraImpl.kt @@ -47,6 +47,9 @@ class MyCameraImpl private constructor(val context: Context, private var cameraT private val scope = CoroutineScope(Dispatchers.Default) + private val _flashlightOn = MutableStateFlow(false) + val flashlightOnFlow = _flashlightOn.asStateFlow() + private val cameraFlash: CameraFlash? get() { if (MyCameraImpl.cameraFlash == null) { @@ -60,9 +63,6 @@ class MyCameraImpl private constructor(val context: Context, private var cameraT stroboFrequency = context.config.stroboscopeFrequency } - private val _flashlightOn = MutableStateFlow(false) - val flashlightOnFlow = _flashlightOn.asStateFlow() - private val _sosDisabled = MutableSharedFlow() val sosDisabled = _sosDisabled.asSharedFlow()