mirror of
https://github.com/fromchat-messenger/app.git
synced 2026-09-22 19:15:05 +03:00
Fix bubble animation
This commit is contained in:
@@ -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(
|
||||
modifier = Modifier
|
||||
.widthIn(max = maxBubbleWidth)
|
||||
.graphicsLayer(
|
||||
scaleX = scale,
|
||||
scaleY = scale,
|
||||
transformOrigin = TransformOrigin.Center
|
||||
)
|
||||
.clip(bubbleShape)
|
||||
.conditional(
|
||||
isAuthor,
|
||||
@@ -253,11 +260,6 @@ fun MessageItem(
|
||||
background(MaterialTheme.colorScheme.surfaceContainerHighest)
|
||||
}
|
||||
)
|
||||
.graphicsLayer(
|
||||
scaleX = scale,
|
||||
scaleY = scale,
|
||||
transformOrigin = TransformOrigin.Center
|
||||
)
|
||||
.padding(top = if (firstContentIsImage) 0.dp else 6.dp)
|
||||
) {
|
||||
val bubbleColumnModifier =
|
||||
|
||||
Reference in New Issue
Block a user