Skip to content

[Bug]: Overlay screen ignores system dark mode (always shows light theme) #28

Description

@MRAKS05

Description

The browser confirmation overlay screen does not respect the system dark mode setting. When the device is set to dark mode, the overlay still renders in the light color scheme (white backgrounds, dark text), making it visually jarring and difficult to read.

Steps to Reproduce

  1. Enable Dark Mode in system settings
  2. Install a browser app (or trigger detection via another method)
  3. The "Browser Detected" overlay appears with the light theme (white card, dark text)
  4. All other screens (Dashboard, Settings, etc.) correctly follow dark mode

Root Cause

OverlayActivity.kt:43 wraps its content with bare MaterialTheme { } instead of the project's custom MyApplicationTheme { } wrapper.

  • MainActivity.kt:71 -> uses MyApplicationTheme (dark mode works)
  • OverlayActivity.kt:43 -> uses MaterialTheme (always defaults to light scheme)

The custom theme (ui/theme/Theme.kt) handles:

  • isSystemInDarkTheme() detection
  • Dynamic color (Android 12+ Monet)
  • Fallback DarkColorScheme / LightColorScheme

Proposed Fix

In OverlayActivity.kt, replace MaterialTheme with MyApplicationTheme and add the import com.browserlimit.app.ui.theme.MyApplicationTheme.

Affected Area

  • UI / Theme (layout, colors, animations)
  • Overlay (countdown, remove/keep buttons)

Metadata

Metadata

Assignees

Labels

area: uiScreens, navigation, composables, themingbugSomething isn't workingpriority: mediumModerate impact — fix when time permits

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions