mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-17 10:39:17 +01:00
Fix wonky webtoon layout when image is loaded at the top of the screen (#5660)
This commit is contained in:
parent
5aea21a194
commit
40aa3b7e18
@ -266,7 +266,6 @@ class WebtoonPageHolder(
|
||||
*/
|
||||
private fun setImage() {
|
||||
progressIndicator.setCompleteProgressAndHide()
|
||||
progressContainer.isVisible = false
|
||||
retryContainer?.isVisible = false
|
||||
removeDecodeErrorLayout()
|
||||
|
||||
@ -324,6 +323,13 @@ class WebtoonPageHolder(
|
||||
initRetryLayout().isVisible = true
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the image is decoded and going to be displayed.
|
||||
*/
|
||||
private fun onImageDecoded() {
|
||||
progressContainer.isVisible = false
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the image fails to decode.
|
||||
*/
|
||||
@ -374,6 +380,10 @@ class WebtoonPageHolder(
|
||||
setCropBorders(cropBorders)
|
||||
setOnImageEventListener(
|
||||
object : SubsamplingScaleImageView.DefaultOnImageEventListener() {
|
||||
override fun onReady() {
|
||||
onImageDecoded()
|
||||
}
|
||||
|
||||
override fun onImageLoadError(e: Exception) {
|
||||
onImageDecodeError()
|
||||
}
|
||||
@ -505,6 +515,7 @@ class WebtoonPageHolder(
|
||||
result.start()
|
||||
}
|
||||
setImageDrawable(result)
|
||||
onImageDecoded()
|
||||
},
|
||||
onError = {
|
||||
onImageDecodeError()
|
||||
|
Loading…
Reference in New Issue
Block a user