Style: Update message bubble colors

Updates the container colors for incoming and outgoing message bubbles to align with Material 3 design tokens.

- The outgoing message bubble container color is changed from `surfaceColorAtElevation(2.dp)` to `surfaceContainer`.
- The reply container color within an outgoing message is changed from `primaryContainer` to `surfaceContainerHighest`.

Additionally, the `@Preview` for `MessageBubble` is updated to display both an incoming and an outgoing message for better design validation.
This commit is contained in:
2025-12-15 23:08:42 +03:00
parent 69a50f8fcd
commit 389d3f9e52
@@ -267,9 +267,9 @@ private fun messageBubbleColors(isOut: Boolean): MessageBubbleColors {
) )
} else { } else {
MessageBubbleColors( MessageBubbleColors(
container = MaterialTheme.colorScheme.surfaceColorAtElevation(2.dp), container = MaterialTheme.colorScheme.surfaceContainer,
content = MaterialTheme.colorScheme.onSurface, content = MaterialTheme.colorScheme.onSurface,
replyContainer = MaterialTheme.colorScheme.primaryContainer replyContainer = MaterialTheme.colorScheme.surfaceContainerHighest
) )
} }
} }
@@ -277,21 +277,41 @@ private fun messageBubbleColors(isOut: Boolean): MessageBubbleColors {
@Preview @Preview
@Composable @Composable
private fun Bubble() { private fun Bubble() {
MessageBubble( Column {
modifier = Modifier, MessageBubble(
text = AnnotatedString("Some cool text"), modifier = Modifier,
isOut = true, text = AnnotatedString("Some cool text"),
date = "19:01", isOut = true,
isEdited = true, date = "19:01",
isRead = true, isEdited = true,
sendingStatus = SendingStatus.SENT, isRead = true,
isPinned = true, sendingStatus = SendingStatus.SENT,
isImportant = true, isPinned = true,
isSelected = false, isImportant = true,
attachments = emptyImmutableList(), isSelected = false,
replyTitle = "Danil Nikolaev", attachments = emptyImmutableList(),
replySummary = "2 photos", replyTitle = "Danil Nikolaev",
onClick = {}, replySummary = "2 photos",
onLongClick = {}, onClick = {},
) onLongClick = {},
)
MessageBubble(
modifier = Modifier,
text = AnnotatedString("Some cool text"),
isOut = false,
date = "19:01",
isEdited = true,
isRead = true,
sendingStatus = SendingStatus.SENT,
isPinned = true,
isImportant = true,
isSelected = false,
attachments = emptyImmutableList(),
replyTitle = "Danil Nikolaev",
replySummary = "2 photos",
onClick = {},
onLongClick = {},
)
}
} }