fixing reply text being unreadable on some material/theme combinations
This commit is contained in:
parent
40222b5ea3
commit
c39a474774
|
@ -31,8 +31,8 @@ private fun createExtended(scheme: ColorScheme) = ExtendedColors(
|
||||||
onSelfBubble = scheme.onPrimary,
|
onSelfBubble = scheme.onPrimary,
|
||||||
othersBubble = scheme.secondaryContainer,
|
othersBubble = scheme.secondaryContainer,
|
||||||
onOthersBubble = scheme.onSecondaryContainer,
|
onOthersBubble = scheme.onSecondaryContainer,
|
||||||
selfBubbleReplyBackground = Color(0x40EAEAEA),
|
selfBubbleReplyBackground = scheme.primary.copy(alpha = 0.2f),
|
||||||
otherBubbleReplyBackground = Color(0x20EAEAEA),
|
otherBubbleReplyBackground = scheme.primary.copy(alpha = 0.2f),
|
||||||
missingImageColors = listOf(
|
missingImageColors = listOf(
|
||||||
Color(0xFFf7c7f7) to Color(0xFFdf20de),
|
Color(0xFFf7c7f7) to Color(0xFFdf20de),
|
||||||
Color(0xFFe5d7f6) to Color(0xFF7b30cf),
|
Color(0xFFe5d7f6) to Color(0xFF7b30cf),
|
||||||
|
|
|
@ -427,6 +427,7 @@ private fun ReplyBubbleContent(content: BubbleContent<RoomEvent.Reply>) {
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
Column(
|
Column(
|
||||||
Modifier
|
Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
.background(if (content.isNotSelf) SmallTalkTheme.extendedColors.otherBubbleReplyBackground else SmallTalkTheme.extendedColors.selfBubbleReplyBackground)
|
.background(if (content.isNotSelf) SmallTalkTheme.extendedColors.otherBubbleReplyBackground else SmallTalkTheme.extendedColors.selfBubbleReplyBackground)
|
||||||
.padding(4.dp)
|
.padding(4.dp)
|
||||||
) {
|
) {
|
||||||
|
@ -436,13 +437,13 @@ private fun ReplyBubbleContent(content: BubbleContent<RoomEvent.Reply>) {
|
||||||
fontSize = 11.sp,
|
fontSize = 11.sp,
|
||||||
text = replyName,
|
text = replyName,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
color = MaterialTheme.colorScheme.onPrimary
|
color = content.textColor()
|
||||||
)
|
)
|
||||||
when (val replyingTo = content.message.replyingTo) {
|
when (val replyingTo = content.message.replyingTo) {
|
||||||
is Message -> {
|
is Message -> {
|
||||||
Text(
|
Text(
|
||||||
text = replyingTo.content,
|
text = replyingTo.content,
|
||||||
color = MaterialTheme.colorScheme.onPrimary,
|
color = content.textColor(),
|
||||||
fontSize = 15.sp,
|
fontSize = 15.sp,
|
||||||
modifier = Modifier.wrapContentSize(),
|
modifier = Modifier.wrapContentSize(),
|
||||||
textAlign = TextAlign.Start,
|
textAlign = TextAlign.Start,
|
||||||
|
|
Loading…
Reference in New Issue