fix bubble colors and favorites icon tint

This commit is contained in:
2024-12-14 01:01:37 +03:00
parent 93ba9c0285
commit 97c3c69e1c
2 changed files with 16 additions and 9 deletions
@@ -134,7 +134,7 @@ fun ConversationItem(
.size(32.dp),
painter = painterResource(id = UiR.drawable.ic_round_bookmark_border_24),
contentDescription = "Favorites icon",
tint = Color.White
tint = MaterialTheme.colorScheme.onPrimary
)
}
} else {
@@ -23,17 +23,23 @@ fun MessageBubble(
date: String?,
edited: Boolean,
) {
val backgroundColor = if (!isOut) {
MaterialTheme.colorScheme.surfaceColorAtElevation(2.dp)
} else {
MaterialTheme.colorScheme.primaryContainer
}
val textColor = if (!isOut) {
MaterialTheme.colorScheme.onSurface
} else {
MaterialTheme.colorScheme.onPrimaryContainer
}
Box(
modifier = modifier
.widthIn(min = 56.dp)
.clip(RoundedCornerShape(24.dp))
.background(
if (isOut) {
MaterialTheme.colorScheme.surfaceColorAtElevation(2.dp)
} else {
MaterialTheme.colorScheme.primaryContainer
}
)
.background(backgroundColor)
.padding(
horizontal = 8.dp,
vertical = 6.dp
@@ -45,7 +51,8 @@ fun MessageBubble(
modifier = Modifier
.padding(2.dp)
.align(Alignment.Center)
.animateContentSize()
.animateContentSize(),
color = textColor
)
}