From fee57715ded375c2fc404687090f677fdfbfae4e Mon Sep 17 00:00:00 2001 From: gedoor Date: Wed, 22 Sep 2021 17:56:39 +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 --- app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt | 3 +-- 1 file changed, 1 insertion(+), 2 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 0d8bb010d..8261fa726 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 @@ -65,9 +65,8 @@ class MyFragment : BaseFragment(R.layout.fragment_my_config) { override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { putPrefBoolean(PreferKey.webService, WebService.isRun) addPreferencesFromResource(R.xml.pref_main) - val webServicePre = findPreference(PreferKey.webService) observeEventSticky(EventBus.WEB_SERVICE) { - webServicePre?.let { + findPreference(PreferKey.webService)?.let { it.isChecked = WebService.isRun it.summary = if (WebService.isRun) { WebService.hostAddress