pull/480/head
gedoor 4 years ago
parent 8a51fd77cf
commit c0a2b69eea
  1. 8
      app/src/main/java/io/legado/app/help/AppConfig.kt

@ -1,6 +1,5 @@
package io.legado.app.help
import android.annotation.SuppressLint
import android.content.Context
import android.content.SharedPreferences
import io.legado.app.App
@ -13,7 +12,6 @@ import io.legado.app.utils.*
object AppConfig : SharedPreferences.OnSharedPreferenceChangeListener {
private val context get() = App.INSTANCE
val isGooglePlay = context.channel == "google"
val isCoolApk = context.channel == "coolApk"
var replaceEnableDefault = context.getPrefBoolean(PreferKey.replaceEnableDefault, true)
var isEInkMode = context.getPrefString(PreferKey.themeMode) == "3"
var clickActionTL = context.getPrefInt(PreferKey.clickActionTL, 2)
@ -104,11 +102,8 @@ object AppConfig : SharedPreferences.OnSharedPreferenceChangeListener {
}
}
var isShowRSS: Boolean
val isShowRSS: Boolean
get() = context.getPrefBoolean(PreferKey.showRss, true)
set(value) {
context.putPrefBoolean(PreferKey.showRss, value)
}
val autoRefreshBook: Boolean
get() = context.getPrefBoolean(R.string.pk_auto_refresh)
@ -148,7 +143,6 @@ object AppConfig : SharedPreferences.OnSharedPreferenceChangeListener {
}
var elevation: Int
@SuppressLint("PrivateResource")
get() = context.getPrefInt(PreferKey.barElevation, AppConst.sysElevation)
set(value) {
context.putPrefInt(PreferKey.barElevation, value)

Loading…
Cancel
Save