From 2fae726e5e16842cd56ba861dd03193d211d4701 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 29 Apr 2026 20:53:38 +0000 Subject: [PATCH] fix(nests): place Audience/Hands tab counter beside the label, not over it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PrimaryTabRow's BadgedBox places the count badge in the top-end corner of its anchor, which on tight tab labels lands directly on top of the text. Lay them out as a Row instead so "Audience 3" reads cleanly, matching the tabbar comment's "Hands ยท 3" intent. --- .../nests/room/screen/NestFullScreen.kt | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/nests/room/screen/NestFullScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/nests/room/screen/NestFullScreen.kt index 15a97ae77..1546caabd 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/nests/room/screen/NestFullScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/nests/room/screen/NestFullScreen.kt @@ -21,8 +21,10 @@ package com.vitorpamplona.amethyst.ui.screen.loggedIn.nests.room.screen import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.consumeWindowInsets import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth @@ -30,7 +32,6 @@ import androidx.compose.foundation.layout.imePadding import androidx.compose.foundation.layout.padding import androidx.compose.material3.AlertDialog import androidx.compose.material3.Badge -import androidx.compose.material3.BadgedBox import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.DropdownMenu import androidx.compose.material3.DropdownMenuItem @@ -51,6 +52,7 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.LocalContext @@ -422,16 +424,18 @@ private fun NestTabRow( selected = tab == selectedTab, onClick = { onSelect(tab) }, text = { - if (count > 0) { - BadgedBox( - badge = { - Badge { Text(text = count.toString()) } - }, - ) { - Text(text = label) - } - } else { + // Lay the label and the count badge side-by-side so + // the count reads as "Audience 3" instead of being + // overlapped on top of the label by `BadgedBox`'s + // default top-end placement (audit Android #43). + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(6.dp), + ) { Text(text = label) + if (count > 0) { + Badge { Text(text = count.toString()) } + } } }, )