Fix `MyCameraImpl` crash

This commit is contained in:
Ensar Sarajčić 2023-10-05 09:43:50 +02:00
parent eae63898e3
commit c354d115ee
1 changed files with 3 additions and 3 deletions

View File

@ -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<Unit>()
val sosDisabled = _sosDisabled.asSharedFlow()