mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-06 03:38:23 +00:00
feat(concord): show the community description to members
The description (CORD-02 §6) only appeared in the admin Edit screen, so a member never saw what the community is about. It now heads the channel list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
07a6a6d408
commit
fa85e3222b
+20
@@ -462,6 +462,26 @@ fun ConcordChannelListScreen(
|
||||
Modifier.fillMaxSize().padding(padding),
|
||||
contentPadding = PaddingValues(bottom = if (canManageChannels) FAB_CLEARANCE else 0.dp),
|
||||
) {
|
||||
// The community's description (CORD-02 §6). Only the Edit screen showed it, so a member
|
||||
// never saw what the community is about.
|
||||
state
|
||||
?.metadata
|
||||
?.description
|
||||
?.trim()
|
||||
?.takeIf { it.isNotEmpty() }
|
||||
?.let { description ->
|
||||
item(key = "concord-community-description") {
|
||||
Text(
|
||||
description,
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
maxLines = 4,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
modifier = Modifier.fillMaxWidth().padding(horizontal = 16.dp, vertical = 10.dp),
|
||||
)
|
||||
HorizontalDivider(thickness = 0.25.dp, color = MaterialTheme.colorScheme.outlineVariant)
|
||||
}
|
||||
}
|
||||
items(channels, key = { it.key }) { entry ->
|
||||
val def = entry.value.definition
|
||||
val name = def.name.ifBlank { entry.key }
|
||||
|
||||
Reference in New Issue
Block a user