pull/2084/head
kunfei 2 years ago
parent 24dc483e95
commit 41732477d6
  1. 14
      app/src/main/java/io/legado/app/help/config/ReadBookConfig.kt

@ -88,14 +88,14 @@ object ReadBookConfig {
} }
fun upBg(width: Int, height: Int) { fun upBg(width: Int, height: Int) {
val tmp = bg val drawable = durConfig.curBgDrawable(width, height)
bg = durConfig.curBgDrawable(width, height).apply { if (drawable is BitmapDrawable && drawable.bitmap != null) {
if (this is BitmapDrawable) { bgMeanColor = drawable.bitmap.getMeanColor()
bgMeanColor = bitmap.getMeanColor() } else if (drawable is ColorDrawable) {
} else if (this is ColorDrawable) { bgMeanColor = drawable.color
bgMeanColor = color
}
} }
val tmp = bg
bg = drawable
(tmp as? BitmapDrawable)?.bitmap?.recycle() (tmp as? BitmapDrawable)?.bitmap?.recycle()
} }

Loading…
Cancel
Save