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 List onMomentumScrollEnd #3759

Merged
merged 1 commit into from
Apr 29, 2024
Merged

Fix List onMomentumScrollEnd #3759

merged 1 commit into from
Apr 29, 2024

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented Apr 29, 2024

I forgot that passing Reanimated handlers breaks built-in event handler properties on FlatList. So because I started passing in onMomentumEnd in the Reanimated handler, the built-in onMomentumScrollEnd was no longer being called.

The fix is to add it to the denylist we already have (which currently has onScroll in it). I've added the other related events there too so that we don't run into this again.

Then we use the existing <ScrollContext> to pass the contextual handler to the List. On this page it doesn't need to compose with anything because there's no top-level scroll context.

Review

Review without whitespace

Test Plan

No effect on the web — that event isn't wired up there. We don't need it on the web either.

iOS and Android are now able to load a long thread upwards.

iosios.mov
anrdoi.mov

Copy link

render bot commented Apr 29, 2024

@gaearon gaearon merged commit 42966fb into main Apr 29, 2024
6 checks passed
@gaearon gaearon deleted the fix-momentum-events branch April 29, 2024 22:38
Copy link

Old size New size Diff
6.44 MB 6.44 MB 325 B (0.00%)

estrattonbailey added a commit that referenced this pull request May 1, 2024
* origin/main: (39 commits)
  [Clipclops] Separate messages if there's a time gap (#3777)
  [Clipclops] Header for chat (#3775)
  [Clipclops] adjust scroll position, keyboard color (#3771)
  [Clipclops] Add clop sent time to clipclop (#3772)
  [Clipclops] Use API data for clipclop list (#3769)
  [Clipclops] New clipclop dialog (#3750)
  Session fixes, pt. 1 (#3762)
  use keyboardDismissMode rather than onScrollBeginDrag (#3767)
  [Clipclops] Add screen to view and send clip clops (#3754)
  switch branch for installing `react-native-bottom-sheet` (#3760)
  Fix List onMomentumScrollEnd (#3759)
  Release 1.80 (#3757)
  Update zh-TW translations (#3678)
  Italian localization (#3684)
  Update catalan messages.po (#3697)
  Update Korean localization (#3698)
  Update Japanese translation (#3734)
  Update zh-CN translations (#3716)
  Send Bluesky feeds and suggested follows more data (#3695)
  android: fix various places still using default Material Teal (#3555)
  ...
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