Thanks for looking into this! Here's the implementation of the threshold detection: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/AnchoredDraggable.kt;l=1398-1432;drc=64c19e2612ecaca5c53a3f7b96d7b4fec2991709 It gets the velocity in onDragStopped by calling Velocity.toFloat: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/AnchoredDraggable.kt;l=430;drc=64c19e2612ecaca5c53a3f7b96d7b4fec2991709 And Velocity.toFloat is aware of the scroll direction, and gets the correct directional component: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Scrollable.kt;l=606;drc=01d017d5f115f8ff9cb1555b6e25daf651ac7b71 So I think our threshold of 150 dp per second might just be really really low.
Bug 1904906 Comment 6 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Thanks for looking into this! Here's the implementation of the threshold detection: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/AnchoredDraggable.kt;l=1398-1432;drc=64c19e2612ecaca5c53a3f7b96d7b4fec2991709 It gets the velocity in onDragStopped by calling Velocity.toFloat: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/AnchoredDraggable.kt;l=430;drc=64c19e2612ecaca5c53a3f7b96d7b4fec2991709 And Velocity.toFloat is aware of the scroll direction, and gets the correct directional component: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Scrollable.kt;l=606;drc=01d017d5f115f8ff9cb1555b6e25daf651ac7b71 So I think our threshold of 150 dp per second might just be really really low. You can cross a lot of distance if you move your finger across the screen for a full second, even at a slow speed.