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(
|
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 =
|
||||||
|
|||||||
Reference in New Issue
Block a user