using bubble colour with alpha for the reply background + some tweaks to padding and corners
This commit is contained in:
parent
8d7a15e758
commit
7f9f761eab
|
@ -477,8 +477,8 @@ private fun ReplyBubbleContent(content: BubbleContent<RoomEvent.Reply>) {
|
||||||
Column(
|
Column(
|
||||||
Modifier
|
Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.background(if (content.isNotSelf) SmallTalkTheme.extendedColors.otherBubbleReplyBackground else SmallTalkTheme.extendedColors.selfBubbleReplyBackground)
|
.background(if (content.isNotSelf) SmallTalkTheme.extendedColors.onOthersBubble.copy(alpha = 0.1f) else SmallTalkTheme.extendedColors.onSelfBubble.copy(alpha = 0.2f), RoundedCornerShape(12.dp))
|
||||||
.padding(4.dp)
|
.padding(8.dp)
|
||||||
) {
|
) {
|
||||||
val replyName = if (!content.isNotSelf && content.message.replyingToSelf) "You" else content.message.replyingTo.author.displayName
|
val replyName = if (!content.isNotSelf && content.message.replyingToSelf) "You" else content.message.replyingTo.author.displayName
|
||||||
?: content.message.replyingTo.author.id.value
|
?: content.message.replyingTo.author.id.value
|
||||||
|
@ -488,12 +488,13 @@ private fun ReplyBubbleContent(content: BubbleContent<RoomEvent.Reply>) {
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
color = content.textColor()
|
color = content.textColor()
|
||||||
)
|
)
|
||||||
|
Spacer(modifier = Modifier.height(2.dp))
|
||||||
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 = content.textColor(),
|
color = content.textColor().copy(alpha = 0.8f),
|
||||||
fontSize = 15.sp,
|
fontSize = 14.sp,
|
||||||
modifier = Modifier.wrapContentSize(),
|
modifier = Modifier.wrapContentSize(),
|
||||||
textAlign = TextAlign.Start,
|
textAlign = TextAlign.Start,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue