Merge pull request #6350 from thundernest/fix_message_list_flash
Set app theme before the first Activity is started
This commit is contained in:
commit
2a8472ae87
2 changed files with 4 additions and 1 deletions
|
@ -40,6 +40,9 @@ internal class RealGeneralSettingsManager(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getSettingsFlow(): Flow<GeneralSettings> {
|
override fun getSettingsFlow(): Flow<GeneralSettings> {
|
||||||
|
// Make sure to load settings now if they haven't been loaded already. This will also update settingsFlow.
|
||||||
|
getSettings()
|
||||||
|
|
||||||
return settingsFlow.distinctUntilChanged()
|
return settingsFlow.distinctUntilChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ class ThemeManager(
|
||||||
.onEach {
|
.onEach {
|
||||||
updateAppTheme(it)
|
updateAppTheme(it)
|
||||||
}
|
}
|
||||||
.launchIn(appCoroutineScope + Dispatchers.Main)
|
.launchIn(appCoroutineScope + Dispatchers.Main.immediate)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateAppTheme(appTheme: AppTheme) {
|
private fun updateAppTheme(appTheme: AppTheme) {
|
||||||
|
|
Loading…
Reference in a new issue