User bubbles: move timestamp + delivery checkmarks to their own bottom-right line (Telegram look, matching agent bubbles) instead of inline at the end of the text

This commit is contained in:
ARIA committed 2026-08-21 00:01:13 +02:00
1 parent f8effb4152
commit a1814d016c
1 file changed
+28 -26
@@ -1912,33 +1912,35 @@ private fun MessageBubble(
Spacer(modifier = Modifier.height(6.dp)) Spacer(modifier = Modifier.height(6.dp))
} }
if (isUser) { if (isUser) {
// M7: text + inline timestamp / delivery status at the end // M7: user text rendered as markdown (bold / italic / inline
// (reference look); the bubble hugs its content. User text is // code), so a pasted snippet or emphasis shows up the same as
// rendered as markdown too (bold / italic / inline code), so a // in replies.
// pasted snippet or emphasis shows up the same as in replies. if (msg.text.isNotBlank() || msg.streaming) {
Row(verticalAlignment = Alignment.Bottom) { MarkdownText(
if (msg.text.isNotBlank() || msg.streaming) { text = msg.text.prepareForMarkdown().preserveNewlinesAsHardBreaks() +
MarkdownText( if (msg.streaming) " ▉" else "",
text = msg.text.prepareForMarkdown().preserveNewlinesAsHardBreaks() + color = textColor,
if (msg.streaming) " ▉" else "", fontSize = 15.sp,
color = textColor, )
fontSize = 15.sp, }
) // M7: timestamp + delivery status on their own line at the
// bottom-right (Telegram look, same as agent bubbles).
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.End,
verticalAlignment = Alignment.CenterVertically,
) {
if (time.isNotEmpty()) {
Text(time, fontSize = 10.sp, color = textColor.copy(alpha = 0.6f))
} }
Spacer(modifier = Modifier.width(8.dp)) when (msg.status) {
Row(verticalAlignment = Alignment.CenterVertically) { MsgStatus.Pending ->
if (time.isNotEmpty()) { Text(" sending…", fontSize = 10.sp, color = textColor.copy(alpha = 0.6f))
Text(time, fontSize = 10.sp, color = textColor.copy(alpha = 0.6f)) MsgStatus.Sent ->
} Text(" ✓", fontSize = 10.sp, color = textColor.copy(alpha = 0.8f))
when (msg.status) { MsgStatus.Read ->
MsgStatus.Pending -> Text(" ✓✓", fontSize = 10.sp, color = textColor.copy(alpha = 0.8f))
Text(" sending…", fontSize = 10.sp, color = textColor.copy(alpha = 0.6f)) MsgStatus.Failed -> Unit
MsgStatus.Sent ->
Text(" ✓", fontSize = 10.sp, color = textColor.copy(alpha = 0.8f))
MsgStatus.Read ->
Text(" ✓✓", fontSize = 10.sp, color = textColor.copy(alpha = 0.8f))
MsgStatus.Failed -> Unit
}
} }
} }
if (msg.status == MsgStatus.Failed) { if (msg.status == MsgStatus.Failed) {