Fix webtoon viewer showing transition view when going to next/prev chapter using next/prev button (#7133)

This commit is contained in:
CVIUS 2022-05-18 05:20:18 +08:00 committed by GitHub
parent 4481c54376
commit b21bcc2d45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -245,7 +245,7 @@ class WebtoonViewer(val activity: ReaderActivity, val isContinuous: Boolean = tr
logcat { "moveToPage" } logcat { "moveToPage" }
val position = adapter.items.indexOf(page) val position = adapter.items.indexOf(page)
if (position != -1) { if (position != -1) {
recycler.scrollToPosition(position) layoutManager.scrollToPositionWithOffset(position, 0)
if (layoutManager.findLastEndVisibleItemPosition() == -1) { if (layoutManager.findLastEndVisibleItemPosition() == -1) {
onScrolled(pos = position) onScrolled(pos = position)
} }