Skip to content

Commit

Permalink
fix: ASC-25825 - fix witdh of clickable area
Browse files Browse the repository at this point in the history
  • Loading branch information
ptchayap committed Sep 23, 2024
1 parent 8856e6b commit bc91287
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
18 changes: 11 additions & 7 deletions src/screens/ChatRoom/ChatRoom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,13 @@ const ChatRoom: ChatRoomScreenComponentType = ({ route }) => {
</View>
</View>
) : (
<Menu>
<Menu
style={[
isUserChat
? styles.currentUserMessage
: styles.friendUserMessage,
]}
>
<MenuTrigger
onAlternativeAction={() =>
openFullImage(message.image as string, message.messageType)
Expand Down Expand Up @@ -445,12 +451,10 @@ const ChatRoom: ChatRoomScreenComponentType = ({ route }) => {
customStyles={{
optionsContainer: {
...styles.optionsContainer,
marginLeft: isUserChat
? 240 +
(message.text && message.text.length < 5
? message.text.length * 10
: 10)
: 0,
marginTop:
isUserChat && message.messageType === 'text'
? -75
: -50,
},
}}
>
Expand Down
8 changes: 6 additions & 2 deletions src/screens/ChatRoom/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,15 @@ export const useStyles = () => {
marginVertical: 5,
borderRadius: 10,
},
userBubble: {
currentUserMessage: {
alignSelf: 'flex-end',
},
friendUserMessage: {
alignSelf: 'flex-start',
},
userBubble: {
backgroundColor: theme.colors.chatBubbles?.userBubble,
maxWidth: '100%',
marginLeft: 60,
},
userMessageDelete: {
alignSelf: 'flex-end',
Expand Down

0 comments on commit bc91287

Please sign in to comment.