Pause live analysis when displaying a capture
This commit is contained in:
@@ -95,7 +95,6 @@ fun CameraScreen(
|
|||||||
onFinalizePressed: () -> Unit,
|
onFinalizePressed: () -> Unit,
|
||||||
modifier: Modifier,
|
modifier: Modifier,
|
||||||
) {
|
) {
|
||||||
// TODO pause the live analysis when displaying the PageValidationDialogs
|
|
||||||
val showPageDialog = rememberSaveable { mutableStateOf(false) }
|
val showPageDialog = rememberSaveable { mutableStateOf(false) }
|
||||||
val isProcessing = rememberSaveable { mutableStateOf(false) }
|
val isProcessing = rememberSaveable { mutableStateOf(false) }
|
||||||
val pageToValidate by viewModel.pageToValidate.collectAsStateWithLifecycle()
|
val pageToValidate by viewModel.pageToValidate.collectAsStateWithLifecycle()
|
||||||
@@ -129,7 +128,7 @@ fun CameraScreen(
|
|||||||
captureController = captureController
|
captureController = captureController
|
||||||
) },
|
) },
|
||||||
pageCount = viewModel.pageCount(),
|
pageCount = viewModel.pageCount(),
|
||||||
liveAnalysisState,
|
liveAnalysisState = if (showPageDialog.value) LiveAnalysisState() else liveAnalysisState,
|
||||||
onCapture = {
|
onCapture = {
|
||||||
Log.i("MyScan", "Pressed <Capture>")
|
Log.i("MyScan", "Pressed <Capture>")
|
||||||
viewModel.liveAnalysisEnabled = false
|
viewModel.liveAnalysisEnabled = false
|
||||||
|
|||||||
Reference in New Issue
Block a user