mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
refactor: Move stuff around
This commit is contained in:
parent
3b42210f10
commit
913f9b6b5c
1 changed files with 15 additions and 13 deletions
|
@ -363,7 +363,8 @@ class PagerPageHolder(
|
|||
val isAnimated = ImageUtil.isAnimatedAndSupported(actualSource)
|
||||
val bgColor = ReaderBackgroundColor.fromPreference(viewer.config.readerTheme)
|
||||
val bgType = getBGType(viewer.config.readerTheme, context)
|
||||
val background = if (!isAnimated && bgColor.isSmartColor) {
|
||||
val background = if (bgColor.isSmartColor) {
|
||||
if (!isAnimated) {
|
||||
if (page.bg != null && page.bgType == bgType) page.bg
|
||||
else {
|
||||
try {
|
||||
|
@ -373,8 +374,9 @@ class PagerPageHolder(
|
|||
ColorDrawable(Color.WHITE)
|
||||
}
|
||||
}
|
||||
} else if (bgColor.isSmartColor && page.bg != null) {
|
||||
} else {
|
||||
page.bg
|
||||
}
|
||||
} else {
|
||||
null
|
||||
}
|
||||
|
@ -387,9 +389,9 @@ class PagerPageHolder(
|
|||
withUIContext {
|
||||
val (bg, bgType) = _bg
|
||||
if (bg != null) pageView?.background = bg
|
||||
if (!isAnimated && page.bg == null && page.bgType != bgType) {
|
||||
page.bg = pageView?.background
|
||||
page.bgType = bgType
|
||||
if (!isAnimated) {
|
||||
if (page.bg == null) page.bg = pageView?.background
|
||||
if (page.bgType != bgType) page.bgType = bgType
|
||||
}
|
||||
setImage(source, isAnimated, imageConfig)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue