pull/1395/head
gedoor 3 years ago
parent 94aa6299c3
commit db1a361392
  1. 7
      app/src/main/java/io/legado/app/constant/AppConst.kt
  2. 3
      app/src/main/java/io/legado/app/constant/Theme.kt

@ -78,13 +78,6 @@ object AppConst {
val sysElevation = appCtx.resources.getDimension(R.dimen.design_appbar_elevation).toInt() val sysElevation = appCtx.resources.getDimension(R.dimen.design_appbar_elevation).toInt()
val darkWebViewJs by lazy {
"""
document.body.style.backgroundColor = "#222222";
document.getElementsByTagName('body')[0].style.webkitTextFillColor = '#8a8a8a';
""".trimIndent()
}
val androidId: String by lazy { val androidId: String by lazy {
Settings.System.getString(appCtx.contentResolver, Settings.Secure.ANDROID_ID) Settings.System.getString(appCtx.contentResolver, Settings.Secure.ANDROID_ID)
} }

@ -13,7 +13,8 @@ enum class Theme {
else -> Light else -> Light
} }
fun getTheme(backgroundColor: Int) = @Suppress("unused")
fun fromBackground(backgroundColor: Int) =
if (ColorUtils.isColorLight(backgroundColor)) Light if (ColorUtils.isColorLight(backgroundColor)) Light
else Dark else Dark

Loading…
Cancel
Save