Files
react-native/ReactAndroid
Xin Chen 1c1945569f Fix mis-use of the post animated value when predict fling distance
Summary:
This diff fixes an edge case where scroll to the end of the list may trigger a bounce back effect.

This issue is a regression from D32487846 (https://github.com/facebook/react-native/commit/f70018b37532622f08f20b2c51cdbfca55d730ea) (See [this comment](https://www.internalfb.com/diff/D32487846 (https://github.com/facebook/react-native/commit/f70018b37532622f08f20b2c51cdbfca55d730ea)?dst_version_fbid=263960175698224&transaction_fbid=566201141113715)) that zero velocity fling at the end of the scroll view makes the next fling animator use previous post animation position. This is due to cached `postAnimationValue` is applied mistakenly.

- Pass velocity instead of velocity sign to the helper class
- Update helper class logic to decide if we need to use post animated value from last fling animation

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D32566010

fbshipit-source-id: 1c61659030151f8f2c7648ca901b8b4158835538
2021-12-06 09:40:57 -08:00
..

Building React Native for Android

See the docs on the wiki.

Running tests

When you submit a pull request CircleCI will automatically run all tests. To run tests locally, see Testing.