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 af839204e..b2747f97e 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 @@ -91,23 +91,20 @@ class MyFragment : BaseFragment(R.layout.fragment_my_config) { } override fun onPreferenceTreeClick(preference: Preference?): Boolean { - preference?.let { - when (preference.key) { - "bookSourceManage" -> context?.startActivity() - "replaceManage" -> context?.startActivity() - "setting" -> context?.startActivity( - Pair("configType", ConfigViewModel.TYPE_CONFIG) - ) - "web_dav_setting" -> context?.startActivity( - Pair("configType", ConfigViewModel.TYPE_WEB_DAV_CONFIG) - ) - "theme_setting" -> context?.startActivity( - Pair("configType", ConfigViewModel.TYPE_THEME_CONFIG) - ) - "donate" -> context?.startActivity() - "about" -> context?.startActivity() - else -> null - } + when (preference?.key) { + "bookSourceManage" -> context?.startActivity() + "replaceManage" -> context?.startActivity() + "setting" -> context?.startActivity( + Pair("configType", ConfigViewModel.TYPE_CONFIG) + ) + "web_dav_setting" -> context?.startActivity( + Pair("configType", ConfigViewModel.TYPE_WEB_DAV_CONFIG) + ) + "theme_setting" -> context?.startActivity( + Pair("configType", ConfigViewModel.TYPE_THEME_CONFIG) + ) + "donate" -> context?.startActivity() + "about" -> context?.startActivity() } return super.onPreferenceTreeClick(preference) }