CameraScreen: avoid ghost quads when live analysis starts
This commit is contained in:
@@ -152,6 +152,10 @@ fun CameraScreen(
|
||||
}
|
||||
}
|
||||
|
||||
LaunchedEffect(Unit) {
|
||||
cameraViewModel.resetLiveAnalysis()
|
||||
}
|
||||
|
||||
val listState = rememberLazyListState()
|
||||
LaunchedEffect(document.pageCount()) {
|
||||
if (!document.isEmpty()) {
|
||||
|
||||
@@ -89,8 +89,14 @@ class CameraViewModel(appContainer: AppContainer): ViewModel() {
|
||||
}
|
||||
}
|
||||
|
||||
fun resetLiveAnalysis() {
|
||||
quadStabilizer = QuadStabilizer()
|
||||
_liveAnalysisState.value = LiveAnalysisState()
|
||||
}
|
||||
|
||||
fun onCapturePressed(frozenImage: Bitmap) {
|
||||
_captureState.value = CaptureState.Capturing(frozenImage)
|
||||
resetLiveAnalysis()
|
||||
}
|
||||
|
||||
private fun onCaptureProcessed(captured: CapturedPage?) {
|
||||
|
||||
Reference in New Issue
Block a user