mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
refactor: Simplify it further
This commit is contained in:
parent
913f9b6b5c
commit
2a95f3d60d
1 changed files with 5 additions and 5 deletions
|
@ -337,7 +337,7 @@ class PagerPageHolder(
|
||||||
private suspend fun setImage() {
|
private suspend fun setImage() {
|
||||||
progressBar.isVisible = true
|
progressBar.isVisible = true
|
||||||
if (extraPage == null) {
|
if (extraPage == null) {
|
||||||
progressBar.completeAndFadeOut()
|
progressBar.setProgress(0)
|
||||||
} else {
|
} else {
|
||||||
progressBar.setProgress(95)
|
progressBar.setProgress(95)
|
||||||
}
|
}
|
||||||
|
@ -388,10 +388,10 @@ class PagerPageHolder(
|
||||||
|
|
||||||
withUIContext {
|
withUIContext {
|
||||||
val (bg, bgType) = _bg
|
val (bg, bgType) = _bg
|
||||||
if (bg != null) pageView?.background = bg
|
if (bg != null) {
|
||||||
if (!isAnimated) {
|
pageView?.background = bg
|
||||||
if (page.bg == null) page.bg = pageView?.background
|
page.bg = pageView?.background
|
||||||
if (page.bgType != bgType) page.bgType = bgType
|
if (!isAnimated) page.bgType = bgType
|
||||||
}
|
}
|
||||||
setImage(source, isAnimated, imageConfig)
|
setImage(source, isAnimated, imageConfig)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue