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
MainActivityviaLaunchedEffect(themeMode), so toggling the preference in Settings updates the global delegate immediately — the next cold launch picks up the change without waiting for the nextApplicationre-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