From 0acd80dd95094a837c8dc05f3fc29ef3e69bdc21 Mon Sep 17 00:00:00 2001 From: AntsyLich <59261191+AntsyLich@users.noreply.github.com> Date: Tue, 4 Nov 2025 12:46:48 +0600 Subject: [PATCH] Fix long strip reader not scrolling on consecutive taps (#2650) --- CHANGELOG.md | 1 + .../ui/reader/viewer/webtoon/WebtoonRecyclerView.kt | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 546841383..852f0840c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co ## [Unreleased] ### Fixed - Fix WebView crash introduced in 0.19.2 ([@bapeey](https://github.com/bapeey)) ([#2649](https://github.com/mihonapp/mihon/pull/2649)) +- Fix long strip reader not scrolling on consecutive taps ([@AntsyLich](https://github.com/AntsyLich)) ([#2650](https://github.com/mihonapp/mihon/pull/2650)) ## [v0.19.2] - 2025-11-02 ### Added diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonRecyclerView.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonRecyclerView.kt index 9b72ee750..cc87af36c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonRecyclerView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonRecyclerView.kt @@ -36,7 +36,7 @@ class WebtoonRecyclerView @JvmOverloads constructor( private var lastVisibleItemPosition = 0 private var currentScale = DEFAULT_RATE - private var isScrolling = false + private var isManuallyScrolling = false private var hasTappedWhileScrolling = false var zoomOutDisabled = false @@ -70,7 +70,7 @@ class WebtoonRecyclerView @JvmOverloads constructor( @SuppressLint("ClickableViewAccessibility") override fun onTouchEvent(e: MotionEvent): Boolean { if (e.actionMasked == MotionEvent.ACTION_DOWN) { - hasTappedWhileScrolling = isScrolling + hasTappedWhileScrolling = isManuallyScrolling } detector.onTouchEvent(e) return super.onTouchEvent(e) @@ -91,7 +91,9 @@ class WebtoonRecyclerView @JvmOverloads constructor( val totalItemCount = layoutManager?.itemCount ?: 0 atLastPosition = visibleItemCount > 0 && lastVisibleItemPosition == totalItemCount - 1 atFirstPosition = firstVisibleItemPosition == 0 - isScrolling = state != SCROLL_STATE_IDLE + if (state == SCROLL_STATE_IDLE) { + isManuallyScrolling = false + } } private fun getPositionX(positionX: Float): Float { @@ -321,6 +323,7 @@ class WebtoonRecyclerView @JvmOverloads constructor( if (startScroll) { isZoomDragging = true + isManuallyScrolling = true } }