fix Can't scroll down to the bottom of the webtoon on the last chapter (#10291)

This commit is contained in:
Naputt1 2024-01-08 10:52:10 +07:00 committed by GitHub
parent a8040cb21a
commit c91ec9a33b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -214,6 +214,9 @@ class WebtoonRecyclerView @JvmOverloads constructor(
if (!isZooming && doubleTapZoom) {
if (scaleX != DEFAULT_RATE) {
zoom(currentScale, DEFAULT_RATE, x, 0f, y, 0f)
layoutParams.height = originalHeight
halfHeight = layoutParams.height / 2
requestLayout()
} else {
val toScale = 2f
val toX = (halfWidth - ev.x) * (toScale - 1)