pull/32/head
kunfei 5 years ago
parent 892c53a825
commit 0f0bd2587c
  1. 3
      app/src/main/java/io/legado/app/ui/main/my/PreferenceFragment.kt
  2. 5
      app/src/main/res/xml/pref_main.xml

@ -8,12 +8,12 @@ import androidx.preference.PreferenceFragmentCompat
import io.legado.app.App import io.legado.app.App
import io.legado.app.R import io.legado.app.R
import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.ThemeStore
import io.legado.app.ui.about.AboutActivity import io.legado.app.ui.about.AboutActivity
import io.legado.app.ui.about.DonateActivity import io.legado.app.ui.about.DonateActivity
import io.legado.app.ui.booksource.BookSourceActivity import io.legado.app.ui.booksource.BookSourceActivity
import io.legado.app.ui.config.ConfigActivity import io.legado.app.ui.config.ConfigActivity
import io.legado.app.ui.config.ConfigViewModel import io.legado.app.ui.config.ConfigViewModel
import io.legado.app.ui.replacerule.ReplaceRuleActivity
import org.jetbrains.anko.startActivity import org.jetbrains.anko.startActivity
class PreferenceFragment : PreferenceFragmentCompat(), class PreferenceFragment : PreferenceFragmentCompat(),
@ -50,6 +50,7 @@ class PreferenceFragment : PreferenceFragmentCompat(),
preference?.let { preference?.let {
when (preference.key) { when (preference.key) {
"bookSourceManage" -> context?.startActivity<BookSourceActivity>() "bookSourceManage" -> context?.startActivity<BookSourceActivity>()
"replaceManage" -> context?.startActivity<ReplaceRuleActivity>()
"setting" -> context?.startActivity<ConfigActivity>( "setting" -> context?.startActivity<ConfigActivity>(
Pair("configType", ConfigViewModel.TYPE_CONFIG) Pair("configType", ConfigViewModel.TYPE_CONFIG)
) )

@ -7,6 +7,11 @@
android:title="书源管理" android:title="书源管理"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<androidx.preference.Preference
android:key="replaceManage"
android:title="替换净化"
app:iconSpaceReserved="false" />
<io.legado.app.lib.theme.prefs.ATESwitchPreference <io.legado.app.lib.theme.prefs.ATESwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:key="isNightTheme" android:key="isNightTheme"

Loading…
Cancel
Save