From f4627a7a1ae8a43df7306b4767c9727e9b6ed1a0 Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 5 Mar 2020 08:16:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt b/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt index 06577d7c9..ddb045c9e 100644 --- a/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt @@ -76,9 +76,8 @@ class MyFragment : BaseFragment(R.layout.fragment_my_config), FileChooserDialog. webServicePre?.isChecked = false } findPreference(PreferKey.themeMode)?.let { - it.setOnPreferenceChangeListener { _, newValue -> - App.INSTANCE.putPrefString(PreferKey.themeMode, newValue.toString()) - App.INSTANCE.applyDayNight() + it.setOnPreferenceChangeListener { _, _ -> + view?.post { App.INSTANCE.applyDayNight() } true } }