From 63310bc1e75258c1195078c6099328f1f48f6c1b Mon Sep 17 00:00:00 2001 From: gedoor Date: Sun, 9 Jun 2019 12:58:50 +0800 Subject: [PATCH] up --- .../java/io/legado/app/ui/config/ThemeConfigFragment.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt b/app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt index 14e7d1f5a..82c198fc2 100644 --- a/app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt +++ b/app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt @@ -40,7 +40,7 @@ class ThemeConfigFragment : PreferenceFragmentCompat(), SharedPreferences.OnShar LiveEventBus.get().with(Bus.recreate).post("") Handler().postDelayed({ activity?.recreate() }, 100) } - "colorPrimary", "colorAccent", "colorBackground" -> + "colorPrimary", "colorAccent", "colorBackground" -> { if (backgroundIsDark(sharedPreferences)) { activity?.let { AlertDialog.Builder(it) @@ -59,7 +59,8 @@ class ThemeConfigFragment : PreferenceFragmentCompat(), SharedPreferences.OnShar } else { upTheme(false) } - "colorPrimaryNight", "colorAccentNight", "colorBackgroundNight" -> + } + "colorPrimaryNight", "colorAccentNight", "colorBackgroundNight" -> { if (backgroundIsLight(sharedPreferences)) { activity?.let { AlertDialog.Builder(it) @@ -78,6 +79,7 @@ class ThemeConfigFragment : PreferenceFragmentCompat(), SharedPreferences.OnShar } else { upTheme(true) } + } } }