VerticalFastScroller: Fix scroller consuming touch when it's invisible (#7484)
This commit is contained in:
parent
da7a64b40d
commit
9385b86ecb
@ -121,11 +121,10 @@ fun VerticalFastScroller(
|
|||||||
.offset { IntOffset(0, thumbOffsetY.roundToInt()) }
|
.offset { IntOffset(0, thumbOffsetY.roundToInt()) }
|
||||||
.then(
|
.then(
|
||||||
// Recompose opts
|
// Recompose opts
|
||||||
if (!listState.isScrollInProgress) {
|
if (isThumbVisible && !listState.isScrollInProgress) {
|
||||||
Modifier.draggable(
|
Modifier.draggable(
|
||||||
interactionSource = dragInteractionSource,
|
interactionSource = dragInteractionSource,
|
||||||
orientation = Orientation.Vertical,
|
orientation = Orientation.Vertical,
|
||||||
enabled = isThumbVisible,
|
|
||||||
state = rememberDraggableState { delta ->
|
state = rememberDraggableState { delta ->
|
||||||
val newOffsetY = thumbOffsetY + delta
|
val newOffsetY = thumbOffsetY + delta
|
||||||
thumbOffsetY = newOffsetY.coerceIn(thumbTopPadding, thumbTopPadding + trackHeightPx)
|
thumbOffsetY = newOffsetY.coerceIn(thumbTopPadding, thumbTopPadding + trackHeightPx)
|
||||||
|
Loading…
Reference in New Issue
Block a user