From 88e6f52ce724cc8f2dfb823eb484fe29abc16d0e Mon Sep 17 00:00:00 2001 From: KaraZajac Date: Tue, 28 Apr 2026 21:15:42 -0400 Subject: [PATCH] Fix START button being disabled before permissions are granted MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The button was gated on `granted || running`, but the only thing that triggers the permission request is tapping the button — catch-22 that left first-time users with no way to grant permissions. Always enable the button when not running; the onStartStop handler already routes correctly (start scanning if granted, else launch the permission request flow). Updated the helper text to point at this directly. --- app/src/main/kotlin/org/soulstone/overwatch/MainActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/org/soulstone/overwatch/MainActivity.kt b/app/src/main/kotlin/org/soulstone/overwatch/MainActivity.kt index e7008e4..d1a8287 100644 --- a/app/src/main/kotlin/org/soulstone/overwatch/MainActivity.kt +++ b/app/src/main/kotlin/org/soulstone/overwatch/MainActivity.kt @@ -70,8 +70,8 @@ class MainActivity : ComponentActivity() { threat = threat, score = maxScore, events = events, - canStart = granted || running, - permissionMessage = if (!granted) "Bluetooth, WiFi + location permissions required" else null, + canStart = true, + permissionMessage = if (!granted) "Tap START to grant Bluetooth, WiFi + location permissions" else null, onStartStop = { if (running) { DetectionService.stop(this)