From b035a4465879a0dc633748e5c41829af94006c1f Mon Sep 17 00:00:00 2001 From: gedoor Date: Wed, 17 Mar 2021 17:00:52 +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/help/AppConfig.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 a0d2dff56..7468fbef5 100644 --- a/app/src/main/java/io/legado/app/help/AppConfig.kt +++ b/app/src/main/java/io/legado/app/help/AppConfig.kt @@ -11,7 +11,6 @@ import splitties.init.appCtx object AppConfig : SharedPreferences.OnSharedPreferenceChangeListener { val isGooglePlay = appCtx.channel == "google" var userAgent: String = getPrefUserAgent() - var replaceEnableDefault = appCtx.getPrefBoolean(PreferKey.replaceEnableDefault, true) var isEInkMode = appCtx.getPrefString(PreferKey.themeMode) == "3" var clickActionTL = appCtx.getPrefInt(PreferKey.clickActionTL, 2) var clickActionTC = appCtx.getPrefInt(PreferKey.clickActionTC, 2) @@ -177,6 +176,8 @@ object AppConfig : SharedPreferences.OnSharedPreferenceChangeListener { val mediaButtonOnExit get() = appCtx.getPrefBoolean("mediaButtonOnExit", true) + val replaceEnableDefault get() = appCtx.getPrefBoolean(PreferKey.replaceEnableDefault, true) + private fun getPrefUserAgent(): String { val ua = appCtx.getPrefString(PreferKey.userAgent) if (ua.isNullOrBlank()) {