From 60ea2c0caef95b87738412e0d15cd597e18df0e9 Mon Sep 17 00:00:00 2001 From: Nain57 Date: Sat, 17 Sep 2022 18:00:19 +0200 Subject: [PATCH] Fix display issue with debug report --- .../com/buzbuz/smartautoclicker/engine/DetectorEngine.kt | 6 ++++-- .../src/main/res/layout/dialog_debug_report.xml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) 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 @@ -->