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

Now rounding window and item bounds. #104

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SudoPlz
Copy link

@SudoPlz SudoPlz commented Jan 10, 2018

- No longer receiving 2 onVisibleIndexesChanged callbacks
- No longer accidentally skipping onVisibleIndexesChanged callbacks
@SudoPlz
Copy link
Author

SudoPlz commented Jan 10, 2018

If you think _.round may affect performance, you can use anything to truncate the float decimals, but I'm not that good with typescript, so I wasn't sure if I can use Math.trunc or bitwise operators such as ~~

@EyMaddis
Copy link

There is also Math.round, no need for lodash...

@SudoPlz
Copy link
Author

SudoPlz commented Jun 19, 2019

True but is anyone ever going to review this even if I make the change?
I don't think we're going anywhere with this.

@andreacassani
Copy link

Thanks, fixed the issue i was having (Android only) with onVisibleIndicesChanged.

I noticed that the contentOffset.x (I'm using an horizontal recyclerlistview) returned by _onScroll was slightly different from the Dimensions.get("window").width of the device that i was setting in the layoutProvider (392.7272644042969 vs 392.72727272727275), probably causing the issue while calculating onVisibleIndicesChanged.

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.

(Android only) onVisibleIndexesChanged callback not always firing
4 participants