Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fling velocity for precise wheel scroll #1402

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

MatkovIvan
Copy link
Member

Fix fling velocity for precise wheel scroll by taking into account time between events

Testing

Manually, by pager snap behaviour

Release Notes

Fixes - Desktop

  • Fix fling velocity for precise wheel scroll

@MatkovIvan MatkovIvan requested a review from igordmn June 12, 2024 07:14
@@ -211,6 +224,7 @@ internal class MouseWheelScrollNode(
return
}
var animationState = AnimationState(0f)
var waitNextEventTimeMs = 0
Copy link
Collaborator

@igordmn igordmn Jun 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dispatchMouseWheelScroll becomes complex and needs refactoring (and tests) in the future. We can make it more understandable with less bugs by reducing/combining states and reading them more closely to where they are written.

Copy link
Member Author

@MatkovIvan MatkovIvan Jun 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplifying/refactoring is always welcome, but it's probably not a blocker here

@MatkovIvan MatkovIvan force-pushed the ivan.matkov/fix-mouse-fling-velocity branch from 0e31f2e to 6327a13 Compare June 17, 2024 14:15
@MatkovIvan MatkovIvan merged commit 28aca32 into jb-main Jul 11, 2024
8 checks passed
@MatkovIvan MatkovIvan deleted the ivan.matkov/fix-mouse-fling-velocity branch July 11, 2024 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants