1 Commits

Author SHA1 Message Date
KaraZajac aa34a1c518 Fix START button being disabled before permissions are granted
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.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 21:15:42 -04:00
@@ -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)