Skip to content

Fix inverted iOS status bar style for light and dark themes #193

Description

@MessiasLima

Description

The iOS implementation of SetupPlatformStatusBar applies the wrong UIStatusBarStyle for the current theme. In Theme.ios.kt, dark theme currently uses UIStatusBarStyleDarkContent and light theme uses UIStatusBarStyleLightContent, which reverses the intended contrast.

This bug is currently latent because FoliaryTheme still defaults isDarkTheme to false, but it will become visible as soon as dark mode is enabled by default or passed explicitly on iOS. The result is poor or invisible status bar icon/text contrast against the app background.

Steps to Reproduce

  1. Launch the iOS app.
  2. Render FoliaryTheme with dark mode enabled, such as isDarkTheme = true or isSystemInDarkTheme().
  3. Observe the iOS status bar content against the dark app background.
  4. Switch back to light mode and observe the status bar content again.

Actual Behavior

On iOS, the status bar style is inverted:

  • Dark theme uses dark status bar content.
  • Light theme uses light status bar content.

This can make the status bar icons and text hard to read or effectively invisible in both themes, depending on the background.

Expected Behavior

On iOS, the status bar style should match the active theme contrast:

  • Dark theme should use UIStatusBarStyleLightContent.
  • Light theme should use UIStatusBarStyleDarkContent.

Additional Information

  • Environment: iOS
  • Priority: Low
  • Related Files: foliary/src/commonMain/kotlin/dev/appoutlet/foliary/core/ui/theme/Theme.kt, foliary/src/iosMain/kotlin/dev/appoutlet/foliary/core/ui/theme/Theme.ios.kt, foliary/src/androidMain/kotlin/dev/appoutlet/foliary/core/ui/theme/Theme.android.kt
  • Workaround: Keep dark theme disabled by default on iOS until the status bar mapping is corrected.
  • Related PR discussion: feat: dark mode #192 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions