Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix timestamps on android touch events to use milliseconds, to be
Summary: Landing D3528215 again, now that D3593884 has landed and makes that easier. Copy-paste summary from previous diff: So PanReponder.onPanResponderRelease/onPanResponderTerminate receive a gestureState object containing a onPanResponderTerminate.vx/vy property. On Android and iOS, they appear to be orders of magnitude different, which appear to be due to the different scale of timestamps that are used when generating touch events. This pull request fixes the timestamps to be milliseconds on both platforms (since I assume iOS is the more authoritative one, and is the one that react-native-viewpager's vx thresholds written written to compare against.) As far as I can tell, the RN code doesn't use the vx/vy properties, so they should be okay. And looks like the RN code only cares about relative values of startTimestamp/currentTimestamp/previousTimestamp though, so should be fine too. it's quite possible there will be downstream android breakage with this change, particularly for those who are already compensating for the RN discrepancy. Reviewed By: foghina Differential Revision: D3819761 fbshipit-source-id: fd2d85748ae6a9cde6af715aabb620f340c2220c
- Loading branch information