Skip to content

Commit

Permalink
[PAY-1362] Mobile press chat message closes reaction popup (#3527)
Browse files Browse the repository at this point in the history
  • Loading branch information
dharit-tan authored Jun 7, 2023
1 parent 06d10e2 commit 3595ce8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ type ChatMessageListItemProps = {
isPopup: boolean
style?: StyleProp<ViewStyle>
onLongPress?: (id: string) => void
handleClosePopup?: () => void
itemsRef?: any
}

Expand All @@ -187,6 +188,7 @@ export const ChatMessageListItem = memo(function ChatMessageListItem(
isPopup = false,
style: styleProp,
onLongPress,
handleClosePopup,
itemsRef
} = props
const styles = useStyles()
Expand Down Expand Up @@ -253,8 +255,8 @@ export const ChatMessageListItem = memo(function ChatMessageListItem(
<Pressable
onLongPress={handleLongPress}
delayLongPress={REACTION_LONGPRESS_DELAY}
onPressIn={handlePressIn}
onPressOut={handlePressOut}
onPressIn={isPopup ? handleClosePopup : handlePressIn}
onPressOut={isPopup ? handleClosePopup : handlePressOut}
>
<View style={styles.shadow}>
<View style={styles.shadow2}>
Expand Down
1 change: 1 addition & 0 deletions packages/mobile/src/screens/chat-screen/ReactionPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ export const ReactionPopup = ({
left: !isAuthor ? spacing(6) : undefined
}
]}
handleClosePopup={handleClosePopup}
/>
<CopyMessagesButton
isAuthor={isAuthor}
Expand Down

0 comments on commit 3595ce8

Please sign in to comment.