[#11] Add a small delay before applying theme so compose has enough time to update remember states before the theme is applied.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -94,7 +94,11 @@ class MainActivity : AppCompatActivity(), ISettingsChangeListener {
|
||||
}
|
||||
|
||||
if (themeValue != AppCompatDelegate.getDefaultNightMode()) {
|
||||
AppCompatDelegate.setDefaultNightMode(themeValue)
|
||||
lifecycleScope.launch {
|
||||
// Give compose a bit of time to update the state.
|
||||
delay(50)
|
||||
AppCompatDelegate.setDefaultNightMode(themeValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user