mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fix: Paged reading mode failing if "Smart Background" is enabled
This commit is contained in:
parent
f4a0264cf0
commit
179680b0d4
1 changed files with 10 additions and 9 deletions
|
@ -504,17 +504,18 @@ class PagerPageHolder(
|
||||||
}
|
}
|
||||||
// if the user switches to automatic when pages are already cached, the bg needs to be loaded
|
// if the user switches to automatic when pages are already cached, the bg needs to be loaded
|
||||||
else {
|
else {
|
||||||
|
val background =
|
||||||
|
try {
|
||||||
|
setBG(actualSource.peek().inputStream())
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Timber.e(e.localizedMessage)
|
||||||
|
ColorDrawable(Color.WHITE)
|
||||||
|
}
|
||||||
setImage(actualSource, false, imageConfig)
|
setImage(actualSource, false, imageConfig)
|
||||||
|
|
||||||
try {
|
pageView?.background = background
|
||||||
pageView?.background = setBG(actualSource.inputStream())
|
page.bg = pageView?.background
|
||||||
} catch (e: Exception) {
|
page.bgType = bgType
|
||||||
Timber.e(e.localizedMessage)
|
|
||||||
pageView?.background = ColorDrawable(Color.WHITE)
|
|
||||||
} finally {
|
|
||||||
page.bg = pageView?.background
|
|
||||||
page.bgType = bgType
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setImage(actualSource, false, imageConfig)
|
setImage(actualSource, false, imageConfig)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue