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

fix: categories index change #179

Merged
merged 1 commit into from
May 9, 2024
Merged

fix: categories index change #179

merged 1 commit into from
May 9, 2024

Conversation

danielmark0116
Copy link
Contributor

@danielmark0116 danielmark0116 commented May 7, 2024

Issue

After recent changes, whenever a user changes the category using the category icons one by one (quickly), picker would change category's index twice (e.g. 0->1->2->1->2 whereas it should only be 0->1->2) - 1) in onPress handler on a category icon and 2) with onMomentumScroll handler.

Fix

Category needs to be changed only with one method at a time thus skipping onMomentumScrollEnd handler whenever the momentum did not start helped (adding additional onMomentumScrollBegin handler was required)

Steps to reproduce the issue

  1. open an emoji picker with category icons either on top or bottom
  2. change category by pressing a category icon
  3. quickly repeat it with another category

Before:

rn-emoji-bug-before.mov

After:

rn-emoji-bug-after.mov

Android is functioning ok as well:

android-rn-emoji-bug-after.mov

@danielmark0116 danielmark0116 merged commit a2db051 into master May 9, 2024
3 checks passed
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.

2 participants