georstat / react-native-image-gallery

React Native Image Gallery with Thumbnails
MIT License
87 stars 19 forks source link

Disable swipe down gesture #4

Closed namnm closed 2 years ago

namnm commented 2 years ago

Hi

Thanks for the library

We found out that the swipe down gesture is not stable. We try render the gallery inside a navigation stack, now we can close the gallery via the navigation header/mechanism.

Do we have an option to disable swipe down gesture? It is pretty unstable and useless now.

geobako commented 2 years ago

Hello, we plan to release v2 with reanimated and gesture handler as pan responder turns out to be buggy especially on android devices and also to add more features more easily . For now we will release shortly a prop to disable the gesture

geobako commented 2 years ago

Added prop to disableSwipe in v1.1.0.

jpsierens88 commented 8 months ago

@geobako this disableSwipe, I'm looking at your code and it does disable the pan gesture, but then it turns on the React Natives scroll on the FlatList. scrollEnabled={!isDragging} so a user is still able to swipe images. (tested in android)

Is there a way you can implement something to actually disable swiping between images? use case is that we want a user to be able to add things on top of an image, which involves gestures like panning. the swipe gesture of the gallery sometimes gets in the way of that. once out of the "editing" state, we can enable swiping again so the user can move on to the next image

geobako commented 8 months ago

Hey guys, I plan to rewrite the library to use reanimated for some time but i haven't had time yet due to work. I will check if there is a quick fix for that now. Pangeaturehandler is getting tedious