Fix bubble animation

This commit is contained in:
2026-04-03 15:27:44 +03:00
Unverified
parent 6bda885bdc
commit 1dae77517a
@@ -229,9 +229,16 @@ fun MessageItem(
) )
} }
// graphicsLayer must wrap clip/shadow/background so the whole bubble scales on press;
// placing it only after background scaled the children but left the bubble chrome unscaled.
Box( Box(
modifier = Modifier modifier = Modifier
.widthIn(max = maxBubbleWidth) .widthIn(max = maxBubbleWidth)
.graphicsLayer(
scaleX = scale,
scaleY = scale,
transformOrigin = TransformOrigin.Center
)
.clip(bubbleShape) .clip(bubbleShape)
.conditional( .conditional(
isAuthor, isAuthor,
@@ -253,11 +260,6 @@ fun MessageItem(
background(MaterialTheme.colorScheme.surfaceContainerHighest) background(MaterialTheme.colorScheme.surfaceContainerHighest)
} }
) )
.graphicsLayer(
scaleX = scale,
scaleY = scale,
transformOrigin = TransformOrigin.Center
)
.padding(top = if (firstContentIsImage) 0.dp else 6.dp) .padding(top = if (firstContentIsImage) 0.dp else 6.dp)
) { ) {
val bubbleColumnModifier = val bubbleColumnModifier =