|
|
@ -40,7 +40,7 @@ class ThemeConfigFragment : PreferenceFragmentCompat(), SharedPreferences.OnShar |
|
|
|
LiveEventBus.get().with(Bus.recreate).post("") |
|
|
|
LiveEventBus.get().with(Bus.recreate).post("") |
|
|
|
Handler().postDelayed({ activity?.recreate() }, 100) |
|
|
|
Handler().postDelayed({ activity?.recreate() }, 100) |
|
|
|
} |
|
|
|
} |
|
|
|
"colorPrimary", "colorAccent", "colorBackground" -> |
|
|
|
"colorPrimary", "colorAccent", "colorBackground" -> { |
|
|
|
if (backgroundIsDark(sharedPreferences)) { |
|
|
|
if (backgroundIsDark(sharedPreferences)) { |
|
|
|
activity?.let { |
|
|
|
activity?.let { |
|
|
|
AlertDialog.Builder(it) |
|
|
|
AlertDialog.Builder(it) |
|
|
@ -59,7 +59,8 @@ class ThemeConfigFragment : PreferenceFragmentCompat(), SharedPreferences.OnShar |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
upTheme(false) |
|
|
|
upTheme(false) |
|
|
|
} |
|
|
|
} |
|
|
|
"colorPrimaryNight", "colorAccentNight", "colorBackgroundNight" -> |
|
|
|
} |
|
|
|
|
|
|
|
"colorPrimaryNight", "colorAccentNight", "colorBackgroundNight" -> { |
|
|
|
if (backgroundIsLight(sharedPreferences)) { |
|
|
|
if (backgroundIsLight(sharedPreferences)) { |
|
|
|
activity?.let { |
|
|
|
activity?.let { |
|
|
|
AlertDialog.Builder(it) |
|
|
|
AlertDialog.Builder(it) |
|
|
@ -79,6 +80,7 @@ class ThemeConfigFragment : PreferenceFragmentCompat(), SharedPreferences.OnShar |
|
|
|
upTheme(true) |
|
|
|
upTheme(true) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|