Skip to content

Commit

Permalink
fix logic for showing tail
Browse files Browse the repository at this point in the history
  • Loading branch information
mozzius committed May 29, 2024
1 parent b816b35 commit 68a40dc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/dms/MessageItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ let MessageItem = ({

const isNextFromSameSender = isNextFromSelf === isFromSelf

const needsTail = !nextIsMessage || !isNextFromSameSender

const isNewDay = useMemo(() => {
// TODO: figure out how we can show this for when we're at the start
// of the conversation
Expand Down Expand Up @@ -110,8 +112,8 @@ let MessageItem = ({
borderRadius: 17,
},
isFromSelf
? {borderBottomRightRadius: isLastInGroup ? 2 : 17}
: {borderBottomLeftRadius: isLastInGroup ? 2 : 17},
? {borderBottomRightRadius: needsTail ? 2 : 17}
: {borderBottomLeftRadius: needsTail ? 2 : 17},
]}>
<RichText
value={rt}
Expand Down

0 comments on commit 68a40dc

Please sign in to comment.