mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-15 10:48:54 +03:00
Don't invalidate theme if it hasn't changed
Change-Id: I0811218679409ac7e111aa7609736fc19de5236b
This commit is contained in:
parent
5e721d55f9
commit
1231e6b0aa
1 changed files with 6 additions and 2 deletions
|
@ -91,8 +91,12 @@ object ThemeUtils {
|
|||
}
|
||||
|
||||
fun invalidateNightMode(context: Context) {
|
||||
mThemeInitialized = false;
|
||||
setApplicationTheme(context.applicationContext, getApplicationLightTheme(context), getApplicationDarkTheme(context))
|
||||
val lightTheme = getApplicationLightTheme(context)
|
||||
val darkTheme = getApplicationDarkTheme(context)
|
||||
if (lightTheme != darkTheme && darkThemePossible(context)) {
|
||||
mThemeInitialized = false;
|
||||
setApplicationTheme(context.applicationContext, getApplicationLightTheme(context), getApplicationDarkTheme(context))
|
||||
}
|
||||
}
|
||||
|
||||
// init the theme
|
||||
|
|
Loading…
Add table
Reference in a new issue