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()) {