github GlassHaven/Haven v5.34.1

latest releases: v5.94.92, v5.94.91, v5.94.90...
6 months ago

Splash dark mode follow-up (#153)

v5.34.0 fixed the common case for issue #153 by switching the activity window theme to a DayNight base, so a system-dark device gets a dark splash. This patch closes the remaining mismatch:

When a user forces the app to LIGHT or DARK in Settings but their phone is in the opposite system mode, the pre-Compose splash window used to follow the system briefly — then Compose redrew the surface in the user's chosen mode. Visible as a flash on launch.

Now the in-app override flows through AppCompatDelegate.setDefaultNightMode(...):

  • Read synchronously from DataStore in Application.onCreate, before the first activity is created. The splash window honours the user's choice from the very first frame.
  • Mirrored reactively from MainActivity via LaunchedEffect(themeMode), so toggling the preference in Settings updates the global delegate immediately — the next cold launch picks up the change without waiting for the next Application re-read.

Fresh installs default to SYSTEM, so the very first launch on a new device still follows system uiMode — that's correct behaviour for an unset preference.


Full changelog: v5.34.0...v5.34.1

Don't miss a new Haven release

NewReleases is sending notifications on new releases.