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.R
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.DonateActivity
import io.legado.app.ui.booksource.BookSourceActivity
import io.legado.app.ui.config.ConfigActivity
import io.legado.app.ui.config.ConfigViewModel
import io.legado.app.ui.replacerule.ReplaceRuleActivity
import org.jetbrains.anko.startActivity
class PreferenceFragment : PreferenceFragmentCompat(),
@ -50,6 +50,7 @@ class PreferenceFragment : PreferenceFragmentCompat(),
preference?.let {
when (preference.key) {
"bookSourceManage" -> context?.startActivity<BookSourceActivity>()
"replaceManage" -> context?.startActivity<ReplaceRuleActivity>()
"setting" -> context?.startActivity<ConfigActivity>(
Pair("configType", ConfigViewModel.TYPE_CONFIG)
)

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

Loading…
Cancel
Save