From 9fb1bf5d35281150ae68bfe884a4187530784f02 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 9 Jul 2022 09:40:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/ui/config/BackupConfigFragment.kt | 7 +++++-- .../java/io/legado/app/ui/config/ThemeConfigFragment.kt | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt b/app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt index 885696cb9..b02431dbe 100644 --- a/app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt +++ b/app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt @@ -139,9 +139,12 @@ class BackupConfigFragment : PreferenceFragment(), override fun onMenuItemSelected(menuItem: MenuItem): Boolean { when (menuItem.itemId) { - R.id.menu_help -> showHelp() + R.id.menu_help -> { + showHelp() + return true + } } - return true + return false } private fun showHelp() { 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 c54203a97..5863fa600 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 @@ -114,9 +114,10 @@ class ThemeConfigFragment : PreferenceFragment(), R.id.menu_theme_mode -> { AppConfig.isNightTheme = !AppConfig.isNightTheme ThemeConfig.applyDayNight(requireContext()) + return true } } - return true + return false } override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?) {