Skip to content

Commit

Permalink
Always show reactions outside of the message bubble
Browse files Browse the repository at this point in the history
No matter which content type it is
  • Loading branch information
lourou committed Oct 15, 2024
1 parent eb9c49d commit e00d3ff
Showing 1 changed file with 7 additions and 27 deletions.
34 changes: 7 additions & 27 deletions components/Chat/Message/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,7 @@ const ChatMessage = ({
const reactions = useMemo(() => getMessageReactions(message), [message]);
const hasReactions = Object.keys(reactions).length > 0;
const isChatMessage = !isGroupUpdated;
const shouldShowReactionsOutside =
isChatMessage && (isAttachment || isFrame || isTransaction);
const shouldShowReactionsInside =
isChatMessage && !shouldShowReactionsOutside;
const shouldShowOutsideContentRow =
isChatMessage &&
(isTransaction || isFrame || (isAttachment && hasReactions));
const shouldShowOutsideContentRow = isChatMessage && hasReactions;

let messageMaxWidth: DimensionValue;
if (isDesktop) {
Expand Down Expand Up @@ -476,18 +470,6 @@ const ChatMessage = ({
</TouchableOpacity>
</View>
)}
{shouldShowReactionsInside && (
<View
style={
hasReactions ? styles.reactionsContainer : { flex: 1 }
}
>
<ChatMessageReactions
message={message}
reactions={reactions}
/>
</View>
)}
</ChatMessageActions>
{shouldShowOutsideContentRow ? (
<View style={styles.outsideContentRow}>
Expand All @@ -502,14 +484,12 @@ const ChatMessage = ({
</Text>
</TouchableOpacity>
)}
{shouldShowReactionsOutside && (
<View style={styles.outsideReactionsContainer}>
<ChatMessageReactions
message={message}
reactions={reactions}
/>
</View>
)}
<View style={styles.outsideReactionsContainer}>
<ChatMessageReactions
message={message}
reactions={reactions}
/>
</View>
{isFrame && message.fromMe && !hasReactions && (
<MessageStatus message={message} />
)}
Expand Down

0 comments on commit e00d3ff

Please sign in to comment.