From 39f69de5e68a013e07af5486a37c1d823e1806d3 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 28 Jul 2026 17:08:40 -0400 Subject: [PATCH] fix(concord): leave room for the FAB in the community channel list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same defect the relay-group and Buzz DM lists had: the Scaffold's padding carries the top/bottom bars but deliberately not the FAB (a FAB overlays content by design), so the last channel row's manager overflow menu sat underneath it and couldn't be tapped. As contentPadding rather than a modifier, so rows scroll *through* the strip instead of the viewport shrinking and leaving the FAB over dead space. Gated on canManageChannels because that is what renders the FAB — a plain member has nothing to clear, and no reason to lose the space. Co-Authored-By: Claude Opus 5 (1M context) --- .../concord/ConcordChannelListScreen.kt | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/publicChannels/concord/ConcordChannelListScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/publicChannels/concord/ConcordChannelListScreen.kt index 55c7509ee8..cbda7206a3 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/publicChannels/concord/ConcordChannelListScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/publicChannels/concord/ConcordChannelListScreen.kt @@ -25,6 +25,7 @@ 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.PaddingValues import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth @@ -321,7 +322,15 @@ fun ConcordChannelListScreen( ) } } else { - LazyColumn(Modifier.fillMaxSize().padding(padding)) { + // Bottom room for the FAB, which the Scaffold's `padding` deliberately doesn't account for + // (a FAB overlays content) — without it the last row's manager overflow menu sits under it + // and can't be tapped. As contentPadding so rows scroll *through* the strip rather than the + // viewport shrinking. Gated on [canManageChannels] because that is what renders the FAB: + // a plain member has nothing to clear, and no reason to lose the space. + LazyColumn( + Modifier.fillMaxSize().padding(padding), + contentPadding = PaddingValues(bottom = if (canManageChannels) FAB_CLEARANCE else 0.dp), + ) { items(channels, key = { it.key }) { entry -> val def = entry.value.definition val name = def.name.ifBlank { entry.key } @@ -452,6 +461,13 @@ private fun ConcordChannelListRow( /** How many recent-poster avatars a channel row's facepile shows at most. */ private const val FACEPILE_MAX = 4 +/** + * Bottom room the list leaves for the floating action button: a 56dp FAB + the Scaffold's 16dp margin + * + slack, so the last row's overflow menu stays tappable instead of sitting under the FAB. Matches + * the value `JobBoardScreen` and the relay-group list screens use. + */ +private val FAB_CLEARANCE = 96.dp + /** * The line under a channel name. When someone is composing it shows a live italic "X is typing…"; * otherwise the last message's author + a snippet ("author: hello"), or a muted "No messages yet"