Skip to content

Commit

Permalink
DMAPP-136: Fix chat UI issue in group chat
Browse files Browse the repository at this point in the history
- Resolve issue where profile icon and wallet address were appearing inside the message bubble in group chats.
  • Loading branch information
meKushdeepSingh committed Nov 29, 2024
1 parent 1fb1158 commit 98af9ab
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/navigation/screens/chats/components/MessageComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,15 @@ const MessageComponent = React.memo(
componentType={componentType}
/>

{isGroupMessage && componentType === 'RECEIVER' && (
<ProfilePicture address={caip10ToWallet(fromDID)} />
)}
{isGroupMessage && componentType === 'RECEIVER' && (
<Text style={messageStyle.groupAddress}>
{getTrimmedAddress(caip10ToWallet(fromDID))}
</Text>
)}

{/* Render the message content */}
<Swipeable
containerStyle={styles.bubbleAlignment}
Expand Down Expand Up @@ -156,17 +165,8 @@ const MessageComponent = React.memo(
/>
)}

{isGroupMessage && componentType === 'RECEIVER' && (
<ProfilePicture address={caip10ToWallet(fromDID)} />
)}

{/* Render the main message content */}
<View>
{isGroupMessage && componentType === 'RECEIVER' && (
<Text style={messageStyle.groupAddress}>
{getTrimmedAddress(caip10ToWallet(fromDID))}
</Text>
)}
{(messageType === 'GIF' || messageType === 'MediaEmbed') && (
<ImageMessage imageSource={messageContent} time={time} />
)}
Expand Down

0 comments on commit 98af9ab

Please sign in to comment.