From a8a422c4e10d04fabd2f5a3828cb7b5b6f3aa8e7 Mon Sep 17 00:00:00 2001 From: AskaEth Date: Tue, 8 Sep 2026 21:06:42 +0800 Subject: [PATCH] =?UTF-8?q?fix(chat):=20=E6=9D=A5=E6=BA=90=E8=A7=92?= =?UTF-8?q?=E6=A0=87=E6=94=B9=E6=8C=82=E5=88=B0=E6=B6=88=E6=81=AF=E7=BB=84?= =?UTF-8?q?=E6=9C=AB=E5=B0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 角标应紧随它标注的那条消息(主人右下、昔涟左下),放在上方会显得在标注下一条。 --- .../kotlin/top/yeij/cyrene/ui/chat/MessageBubble.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/kotlin/top/yeij/cyrene/ui/chat/MessageBubble.kt b/app/src/main/kotlin/top/yeij/cyrene/ui/chat/MessageBubble.kt index d948ae8..2b89bc4 100644 --- a/app/src/main/kotlin/top/yeij/cyrene/ui/chat/MessageBubble.kt +++ b/app/src/main/kotlin/top/yeij/cyrene/ui/chat/MessageBubble.kt @@ -54,7 +54,12 @@ fun MessageBubble(message: HistoryMessageDto) { horizontalAlignment = if (isUser) Alignment.End else Alignment.Start, verticalArrangement = Arrangement.spacedBy(6.dp), ) { - // 来源角标放在消息组顶部,明确标注下面这一组气泡来自哪里 + bubbles.forEach { bubble -> + AnnotationLine(bubble.head) + if (bubble.body.isNotEmpty()) BubbleBody(bubble.body, isUser) + AnnotationLine(bubble.tail) + } + // 来源角标挂在消息组末尾,紧随它标注的那条消息(主人右下、昔涟左下) if (source != null) { Text( text = source, @@ -63,11 +68,6 @@ fun MessageBubble(message: HistoryMessageDto) { modifier = Modifier.padding(start = 6.dp, end = 6.dp), ) } - bubbles.forEach { bubble -> - AnnotationLine(bubble.head) - if (bubble.body.isNotEmpty()) BubbleBody(bubble.body, isUser) - AnnotationLine(bubble.tail) - } } }