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 =