From 984cafd1fbdf220aa1ceec360c9f786c29a519bf Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 14 Jul 2026 21:52:19 -0400 Subject: [PATCH] fix(concord): community title fallback + round channel-create FAB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The channel-list screen titled itself `state.metadata.name ?: app_name`, so before the metadata edition folded it showed the app's own name — "Amy Debug" in a debug build. Prefer the folded name, then the stored community name from the list entry (always present from the join/create, and what shows everywhere else); the app-name fallback is now effectively unreachable. The channel-create FAB used Material 3's default rounded-square shape; every other FAB in the app is a circle. Set shape = CircleShape to match. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../concord/ConcordChannelListScreen.kt | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) 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 959efe2288..1ec3fcc42f 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 @@ -32,6 +32,7 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items +import androidx.compose.foundation.shape.CircleShape import androidx.compose.material3.AlertDialog import androidx.compose.material3.DropdownMenu import androidx.compose.material3.DropdownMenuItem @@ -155,7 +156,17 @@ fun ConcordChannelListScreen( Scaffold( topBar = { TopAppBar( - title = { Text(state?.metadata?.name ?: stringRes(com.vitorpamplona.amethyst.R.string.app_name), maxLines = 1) }, + title = { + // Prefer the folded metadata name, then the stored community name from the list + // entry (always present from the join/create — this is what shows everywhere else). + // Fall back to the app name only if neither exists (should be unreachable), never as + // the normal "metadata hasn't folded yet" placeholder — that showed "Amy Debug". + val title = + state?.metadata?.name + ?: session?.entry?.name?.ifBlank { null } + ?: stringRes(com.vitorpamplona.amethyst.R.string.app_name) + Text(title, maxLines = 1) + }, navigationIcon = { IconButton(onClick = { nav.popBack() }) { SymbolIcon(symbol = MaterialSymbols.AutoMirrored.ArrowBack, contentDescription = stringRes(com.vitorpamplona.amethyst.R.string.back)) @@ -198,7 +209,10 @@ fun ConcordChannelListScreen( }, floatingActionButton = { if (canManageChannels) { - FloatingActionButton(onClick = { channelEditor = ConcordChannelEditor(channelIdHex = null, initialName = "") }) { + FloatingActionButton( + onClick = { channelEditor = ConcordChannelEditor(channelIdHex = null, initialName = "") }, + shape = CircleShape, + ) { SymbolIcon(symbol = MaterialSymbols.Add, contentDescription = stringRes(com.vitorpamplona.amethyst.R.string.concord_channel_create)) } }