pull/32/head
gedoor 6 years ago
parent f99e40b719
commit 38a981c623
  1. 4
      app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt

@ -36,6 +36,10 @@ class ThemeConfigFragment : PreferenceFragmentCompat(), SharedPreferences.OnShar
override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?) { override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?) {
sharedPreferences ?: return sharedPreferences ?: return
when (key) { when (key) {
"transparentStatusBar" -> {
LiveEventBus.get().with(Bus.recreate).post("")
Handler().postDelayed({ activity?.recreate() }, 100)
}
"colorPrimary", "colorAccent", "colorBackground" -> "colorPrimary", "colorAccent", "colorBackground" ->
if (backgroundIsDark(sharedPreferences)) { if (backgroundIsDark(sharedPreferences)) {
activity?.let { activity?.let {

Loading…
Cancel
Save