diff --git a/native/chat/composed-message.react.js b/native/chat/composed-message.react.js --- a/native/chat/composed-message.react.js +++ b/native/chat/composed-message.react.js @@ -199,6 +199,8 @@ const positioning = isViewer ? 'right' : 'left'; inlineEngagement = ( { + const nextLocalID = useSelector(state => state.nextLocalID); + const localID = `${localIDPrefix}${nextLocalID}`; + + const sendReaction = useSendReaction( + messageInfo.id, + localID, + threadInfo.id, + reactions, + ); + + const onPressReaction = React.useCallback( + (reaction: string) => sendReaction(reaction), + [sendReaction], + ); + + const onLongPressReaction = React.useCallback(() => { navigate<'MessageReactionsModal'>({ name: MessageReactionsModalRouteName, params: { reactions }, @@ -164,7 +187,8 @@ return ( onPressReaction(reaction)} + onLongPress={onLongPressReaction} activeOpacity={0.7} key={reaction} > @@ -172,7 +196,13 @@ ); }); - }, [onPressReactions, reactionStyle, reactions, styles.reaction]); + }, [ + onLongPressReaction, + onPressReaction, + reactionStyle, + reactions, + styles.reaction, + ]); const inlineEngagementPositionStyle = React.useMemo(() => { const styleResult = [styles.inlineEngagement]; @@ -365,6 +395,8 @@