conradchen 5b9f27aad0 [SnackBar] Make dismiss direction the same as swipe direction
In SwipeDismissBehavior, when dismissing views according to the horizontal velocity instead of position delta, we would still using position delta to decide the dismissing direction, which, unfortunately, makes the view always be dismissed from left to right because of the "less than" logic we are using doesn't really take the equaling case into account. Fixes this by using the velocity direction to dismiss the view instead.

Resolves https://github.com/material-components/material-components-android/issues/1868

PiperOrigin-RevId: 442553318
2022-04-18 13:12:46 -04:00
..