From 70bc25db001c6da7c0ab82c2e69467aa36c47d0d Mon Sep 17 00:00:00 2001 From: Alex Risch Date: Wed, 28 Aug 2024 15:29:00 -0600 Subject: [PATCH] fix: Context Menu Crash Added workaround from https://github.com/dominicstop/react-native-ios-context-menu/issues/9#issuecomment-1047058781 --- components/Chat/Message/Message.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/Chat/Message/Message.tsx b/components/Chat/Message/Message.tsx index 2430e376a..1356db1b2 100644 --- a/components/Chat/Message/Message.tsx +++ b/components/Chat/Message/Message.tsx @@ -79,6 +79,8 @@ type Props = { isFrame: boolean; }; +const noop = () => {}; + const MessageSender = ({ message }: { message: MessageToDisplay }) => { const address = useInboxIdStore( (s) => s.byInboxId[message.senderAddress]?.[0] ?? message.senderAddress @@ -327,6 +329,8 @@ function ChatMessage({ message, colorScheme, isGroup, isFrame }: Props) { styles.innerBubble, message.fromMe ? styles.innerBubbleMe : undefined, ]} + delayLongPress={100} + onLongPress={noop} delayPressIn={isDesktop ? 0 : 75} onPress={() => { converseEventEmitter.emit("scrollChatToMessage", {