forked from Ivasoft/mattermost-mobile
[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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user