From fc12a1205cceab323f1165205cd68268ff291436 Mon Sep 17 00:00:00 2001 From: Ansh Date: Wed, 7 Jun 2023 07:57:49 -0700 Subject: [PATCH] allow image to clicked to go to post in notificaitons (#858) --- src/view/com/notifications/FeedItem.tsx | 2 +- src/view/com/util/images/ImageHorzList.tsx | 45 +++++----------------- 2 files changed, 11 insertions(+), 36 deletions(-) diff --git a/src/view/com/notifications/FeedItem.tsx b/src/view/com/notifications/FeedItem.tsx index ac2e2a19..7994c53a 100644 --- a/src/view/com/notifications/FeedItem.tsx +++ b/src/view/com/notifications/FeedItem.tsx @@ -165,7 +165,7 @@ export const FeedItem = observer(function ({ } return ( - // eslint-disable-next-line + // eslint-disable-next-line react-native-a11y/no-nested-touchables void style?: StyleProp } -export function ImageHorzList({images, onPress, style}: Props) { - const numImages = images.length +export function ImageHorzList({images, style}: Props) { return ( - {images.map(({thumb, alt}, i) => ( - onPress?.(i)} + {images.map(({thumb, alt}) => ( + { - switch (action.nativeEvent.actionName) { - case 'press': - onPress?.(0) - break - default: - break - } - }}> - - + accessibilityIgnoresInvertColors + accessibilityHint={alt} + accessibilityLabel="" + /> ))} )