From a7ae40242abecac4dbd790ac18523ed8d42ae203 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Sun, 27 Sep 2026 20:49:19 -0400 Subject: [PATCH] fix(chat): a quoted reply no longer stretches its bubble across the screen Every bubble's outer row filled the available width so it could sit on its side of the screen. A quoted reply is a bubble drawn inside another bubble, and filling the width there pushed the outer bubble to its maximum (85% of the screen), so a one-word answer quoting a one-word message spanned the chat. This affected every chat that renders replies (NIP-17, public chats, Marmot, Concord, Buzz). The quoted bubble now wraps its content. Co-Authored-By: Claude Opus 5.5 --- .../amethyst/commons/chats/ui/ChatBubbleLayout.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/commonsUI/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chats/ui/ChatBubbleLayout.kt b/commonsUI/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chats/ui/ChatBubbleLayout.kt index 3583623b52..c04a634407 100644 --- a/commonsUI/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chats/ui/ChatBubbleLayout.kt +++ b/commonsUI/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chats/ui/ChatBubbleLayout.kt @@ -300,8 +300,11 @@ fun ChatBubbleLayout( Modifier } + // A top-level bubble's row spans the screen so the bubble can sit on its side. A quoted + // reply is drawn INSIDE another bubble, where filling the width pushed that bubble out to + // its maximum: a one-word answer to a one-word message stretched across the screen. Row( - modifier = Modifier.fillMaxWidth().then(swipeModifier), + modifier = (if (innerQuote) Modifier else Modifier.fillMaxWidth()).then(swipeModifier), horizontalArrangement = if (isLoggedInUser) Arrangement.End else Arrangement.Start, ) { InnerChatBubble(