diff --git a/engine/src/main/java/com/buzbuz/smartautoclicker/engine/DetectorEngine.kt b/engine/src/main/java/com/buzbuz/smartautoclicker/engine/DetectorEngine.kt index a13e13ede..3f6cc1ce4 100644 --- a/engine/src/main/java/com/buzbuz/smartautoclicker/engine/DetectorEngine.kt +++ b/engine/src/main/java/com/buzbuz/smartautoclicker/engine/DetectorEngine.kt @@ -280,10 +280,12 @@ class DetectorEngine(context: Context) { processingJob = processingScope?.launch { imageDetector = NativeDetector() + + val shouldDebug = debugInstantData || debugReport _debugEngine.value = - if ( _isDebugging.value) DebugEngine(debugInstantData, debugReport, _scenario.value!!, scenarioEvents.value) + if (shouldDebug) DebugEngine(debugInstantData, debugReport, _scenario.value!!, scenarioEvents.value) else null - _isDebugging.emit(debugInstantData || debugReport) + _isDebugging.emit(shouldDebug) scenarioProcessor = ScenarioProcessor( imageDetector = imageDetector!!, diff --git a/smartautoclicker/src/main/res/layout/dialog_debug_report.xml b/smartautoclicker/src/main/res/layout/dialog_debug_report.xml index e5bd13607..259860105 100644 --- a/smartautoclicker/src/main/res/layout/dialog_debug_report.xml +++ b/smartautoclicker/src/main/res/layout/dialog_debug_report.xml @@ -17,7 +17,7 @@ -->