-
-
Notifications
You must be signed in to change notification settings - Fork 980
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 onStart
callbacks of ReanimatedSwipeable
being called every update
#3151
Fix onStart
callbacks of ReanimatedSwipeable
being called every update
#3151
Conversation
runOnJS(onSwipeableOpenStartDrag)(direction); | ||
} else if (rowState.value !== 0 && onSwipeableCloseStartDrag) { | ||
runOnJS(onSwipeableCloseStartDrag)(direction); | ||
if (dragStarted.value === false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not
if (dragStarted.value === false) { | |
if (!dragStarted.value) { |
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in d0bda43
updateAnimatedEvent(); | ||
}) | ||
.onEnd( | ||
(event: GestureStateChangeEvent<PanGestureHandlerEventPayload>) => { | ||
handleRelease(event); | ||
} | ||
); | ||
) | ||
.onFinalize(() => (dragStarted.value = false)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.onFinalize(() => (dragStarted.value = false)); | |
.onFinalize(() => { | |
dragStarted.value = false | |
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in d0bda43
Description
Fix
onStart
callbacks ofReanimatedSwipeable
being called every update.Moved from #3149
Test plan
Swipeable Reanimation
exampleReanimatedSwipeable
component with the following code: