Skip to content

Commit

Permalink
Fix negative margin usage
Browse files Browse the repository at this point in the history
  • Loading branch information
jmartinesp committed Nov 4, 2024
1 parent a8365e6 commit 7861342
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,12 @@ private fun TimelineItemEventRowContent(
MessageEventBubble(
modifier = Modifier
.constrainAs(message) {
top.linkTo(sender.bottom, margin = NEGATIVE_MARGIN_FOR_BUBBLE)
val topMargin = if (bubbleState.cutTopStart) {
NEGATIVE_MARGIN_FOR_BUBBLE
} else {
0.dp
}
top.linkTo(sender.bottom, margin = topMargin)
if (event.isMine) {
end.linkTo(parent.end, margin = 16.dp)
} else {
Expand Down

0 comments on commit 7861342

Please sign in to comment.