Skip to content

Commit

Permalink
Update ReactScrollView.java
Browse files Browse the repository at this point in the history
  • Loading branch information
cpojer committed Apr 23, 2019
1 parent 7a18d18 commit 75c210d
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,15 +314,11 @@ public void fling(int velocityY) {
//
// Hence, we can use the absolute value from whatever the OS gives
// us and use the sign of what mOnScrollDispatchHelper has tracked.
//final int correctedVelocityY = (int)(Math.abs(velocityY) * Math.signum(mOnScrollDispatchHelper.getYFlingVelocity()));

//BEGIN pavel.rotek wrong velocity on old phones
float signum = Math.signum(mOnScrollDispatchHelper.getYFlingVelocity());
if (signum == 0) {
signum = Math.signum(velocityY);
}
final int correctedVelocityY = (int)(Math.abs(velocityY) * signum);
//END

if (mPagingEnabled) {
flingAndSnap(correctedVelocityY);
Expand Down

0 comments on commit 75c210d

Please sign in to comment.