[Gekidou] Markdown and Touchables (#6047)

* Fix markdown formatting and touchable interaction

* open gallery as overlay instead of modal

* update snapshots

* Add missing dependencies to useMemo
This commit is contained in:
Elias Nahum
2022-03-14 16:32:06 -03:00
committed by GitHub
parent acf4cbde8d
commit a43dad53e1
48 changed files with 793 additions and 825 deletions

View File

@@ -10,7 +10,6 @@ import {
} from 'react-native-reanimated';
import {useGallery} from '@context/gallery';
import {measureItem} from '@utils/gallery';
import type {GestureHandlerGestureEvent} from 'react-native-gesture-handler';
@@ -236,20 +235,13 @@ export function useGalleryItem(
gallery.registerItem(index, ref);
}, []);
const onGestureEvent = useAnimatedGestureHandler({
onFinish: (_evt, _ctx, isCanceledOrFailed) => {
if (isCanceledOrFailed) {
return;
}
const onGestureEvent = () => {
'worklet';
activeIndex.value = index;
activeIndex.value = index;
// measure the images
// width/height and position to animate from it to the full screen one
measureItem(ref, gallery.sharedValues);
runOnJS(onPress)(identifier, index);
},
});
runOnJS(onPress)(identifier, index);
};
return {
ref,