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()
|
val listState = rememberLazyListState()
|
||||||
LaunchedEffect(document.pageCount()) {
|
LaunchedEffect(document.pageCount()) {
|
||||||
if (!document.isEmpty()) {
|
if (!document.isEmpty()) {
|
||||||
|
|||||||
@@ -89,8 +89,14 @@ class CameraViewModel(appContainer: AppContainer): ViewModel() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun resetLiveAnalysis() {
|
||||||
|
quadStabilizer = QuadStabilizer()
|
||||||
|
_liveAnalysisState.value = LiveAnalysisState()
|
||||||
|
}
|
||||||
|
|
||||||
fun onCapturePressed(frozenImage: Bitmap) {
|
fun onCapturePressed(frozenImage: Bitmap) {
|
||||||
_captureState.value = CaptureState.Capturing(frozenImage)
|
_captureState.value = CaptureState.Capturing(frozenImage)
|
||||||
|
resetLiveAnalysis()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun onCaptureProcessed(captured: CapturedPage?) {
|
private fun onCaptureProcessed(captured: CapturedPage?) {
|
||||||
|
|||||||
Reference in New Issue
Block a user