From 9385b86ecb92bd91e5ad65d0eed2580b6b4c6973 Mon Sep 17 00:00:00 2001 From: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com> Date: Sat, 9 Jul 2022 20:20:47 +0700 Subject: [PATCH] VerticalFastScroller: Fix scroller consuming touch when it's invisible (#7484) --- .../eu/kanade/presentation/components/VerticalFastScroller.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/presentation/components/VerticalFastScroller.kt b/app/src/main/java/eu/kanade/presentation/components/VerticalFastScroller.kt index 009219afb..01f51423e 100644 --- a/app/src/main/java/eu/kanade/presentation/components/VerticalFastScroller.kt +++ b/app/src/main/java/eu/kanade/presentation/components/VerticalFastScroller.kt @@ -121,11 +121,10 @@ fun VerticalFastScroller( .offset { IntOffset(0, thumbOffsetY.roundToInt()) } .then( // Recompose opts - if (!listState.isScrollInProgress) { + if (isThumbVisible && !listState.isScrollInProgress) { Modifier.draggable( interactionSource = dragInteractionSource, orientation = Orientation.Vertical, - enabled = isThumbVisible, state = rememberDraggableState { delta -> val newOffsetY = thumbOffsetY + delta thumbOffsetY = newOffsetY.coerceIn(thumbTopPadding, thumbTopPadding + trackHeightPx)