From 052ea4818e2ddb9706eff2e88997830b6bc96a6c Mon Sep 17 00:00:00 2001 From: gedoor Date: Sun, 25 Oct 2020 21:40:26 +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/constant/PreferKey.kt | 1 + app/src/main/java/io/legado/app/help/AppConfig.kt | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/constant/PreferKey.kt b/app/src/main/java/io/legado/app/constant/PreferKey.kt index 0aa00ac2a..2e385f9ca 100644 --- a/app/src/main/java/io/legado/app/constant/PreferKey.kt +++ b/app/src/main/java/io/legado/app/constant/PreferKey.kt @@ -52,6 +52,7 @@ object PreferKey { const val replaceEnableDefault = "replaceEnableDefault" const val showBrightnessView = "showBrightnessView" const val autoClearExpired = "autoClearExpired" + const val autoChangeSource = "autoChangeSource" const val cPrimary = "colorPrimary" const val cAccent = "colorAccent" diff --git a/app/src/main/java/io/legado/app/help/AppConfig.kt b/app/src/main/java/io/legado/app/help/AppConfig.kt index 05a180006..82afe6a8b 100644 --- a/app/src/main/java/io/legado/app/help/AppConfig.kt +++ b/app/src/main/java/io/legado/app/help/AppConfig.kt @@ -120,9 +120,11 @@ object AppConfig { App.INSTANCE.putPrefInt(PreferKey.barElevation, value) } - val autoChangeSource: Boolean get() = App.INSTANCE.getPrefBoolean("autoChangeSource", true) + val autoChangeSource: Boolean + get() = App.INSTANCE.getPrefBoolean(PreferKey.autoChangeSource, true) - val readBodyToLh: Boolean get() = App.INSTANCE.getPrefBoolean(PreferKey.readBodyToLh, true) + val readBodyToLh: Boolean + get() = App.INSTANCE.getPrefBoolean(PreferKey.readBodyToLh, true) fun upReplaceEnableDefault() { replaceEnableDefault =