mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-23 18:05:59 +03:00
Fix formatting in ThemeUtils
This commit is contained in:
parent
3e78098c43
commit
c9eacec449
1 changed files with 2 additions and 2 deletions
|
@ -102,7 +102,7 @@ object ThemeUtils {
|
|||
fun setApplicationTheme(context: Context, aTheme: String) {
|
||||
currentTheme.set(aTheme)
|
||||
when (aTheme) {
|
||||
SYSTEM_THEME_VALUE -> context.setTheme(if(isSystemDarkTheme(context.resources)) R.style.AppTheme_Dark else R.style.AppTheme_Light)
|
||||
SYSTEM_THEME_VALUE -> context.setTheme(if (isSystemDarkTheme(context.resources)) R.style.AppTheme_Dark else R.style.AppTheme_Light)
|
||||
THEME_DARK_VALUE -> context.setTheme(R.style.AppTheme_Dark)
|
||||
THEME_BLACK_VALUE -> context.setTheme(R.style.AppTheme_Black)
|
||||
else -> context.setTheme(R.style.AppTheme_Light)
|
||||
|
@ -119,7 +119,7 @@ object ThemeUtils {
|
|||
*/
|
||||
fun setActivityTheme(activity: Activity, otherThemes: ActivityOtherThemes) {
|
||||
when (getApplicationTheme(activity)) {
|
||||
SYSTEM_THEME_VALUE -> if(isSystemDarkTheme(activity.resources)) activity.setTheme(otherThemes.dark)
|
||||
SYSTEM_THEME_VALUE -> if (isSystemDarkTheme(activity.resources)) activity.setTheme(otherThemes.dark)
|
||||
THEME_DARK_VALUE -> activity.setTheme(otherThemes.dark)
|
||||
THEME_BLACK_VALUE -> activity.setTheme(otherThemes.black)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue