feat: 优化代码

pull/133/head
kunfei 5 years ago
parent 9298638ead
commit f4627a7a1a
  1. 5
      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 webServicePre?.isChecked = false
} }
findPreference<NameListPreference>(PreferKey.themeMode)?.let { findPreference<NameListPreference>(PreferKey.themeMode)?.let {
it.setOnPreferenceChangeListener { _, newValue -> it.setOnPreferenceChangeListener { _, _ ->
App.INSTANCE.putPrefString(PreferKey.themeMode, newValue.toString()) view?.post { App.INSTANCE.applyDayNight() }
App.INSTANCE.applyDayNight()
true true
} }
} }

Loading…
Cancel
Save