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

Support image long press handler #36

Merged
merged 3 commits into from
May 3, 2020

Conversation

nojimage
Copy link
Contributor

@nojimage nojimage commented Apr 6, 2020

Add the onLongPress and delayLongPress options.

I want to bring up the operation menu by long press the image, so I added.

@@ -101,6 +106,10 @@ const ImageItem = ({
scrollValueY.setValue(offsetY);
};

const onLongPressHandler = (event: GestureResponderEvent) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better wrap it with useCallback here

@@ -101,6 +107,10 @@ const ImageItem = ({
scrollValueY.setValue(offsetY);
};

const onLongPressHandler = (event: GestureResponderEvent) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better wrap it with useCallback here

@nojimage
Copy link
Contributor Author

@antonKalinin thank you for reviewing. I changed it.

@maksimko
Copy link
Contributor

maksimko commented May 3, 2020

👍 All good, thank you.

@maksimko maksimko merged commit f5508f7 into jobtoday:master May 3, 2020
@nojimage nojimage deleted the long-press-handler branch May 7, 2020 06:59
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.

None yet

3 participants