取消动画,处理关闭界面相机预览残留问题
This commit is contained in:
@@ -15,6 +15,7 @@ import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.asStateFlow
|
||||
import kotlinx.coroutines.flow.update
|
||||
import kotlinx.coroutines.launch
|
||||
import timber.log.Timber
|
||||
@@ -57,6 +58,14 @@ class SelfProcurementViewModel @Inject constructor(
|
||||
private val _weightInfo = MutableStateFlow<Double?>(0.0)
|
||||
val weightInfo: StateFlow<Double?> = _weightInfo
|
||||
|
||||
|
||||
private val _showCameraPreview = MutableStateFlow(true)
|
||||
val showCameraPreview = _showCameraPreview.asStateFlow()
|
||||
|
||||
fun updateCameraPreviewShow(show: Boolean) {
|
||||
_showCameraPreview.value = show
|
||||
}
|
||||
|
||||
/**
|
||||
* 数量是否是用户输入的值
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user