refactor chat room connect

This commit is contained in:
2026-05-19 16:00:41 +07:00
parent 0104cf453d
commit e5710f376e
4 changed files with 109 additions and 80 deletions

View File

@@ -360,19 +360,19 @@ fun ChatRoom(room: Room, onClick: () -> Unit) {
)
}
val defaultMenuList = listOf(
"Messaging Relays",
"Spam Filter",
"Contacts",
"Settings",
"About"
)
@OptIn(ExperimentalMaterial3ExpressiveApi::class)
@Composable
fun BottomMenuList() {
val viewModel = LocalNostrViewModel.current
val defaultMenuList = listOf(
"Messaging Relays" to { },
"Spam Filter" to { },
"Contacts" to { },
"Settings" to { },
"About" to { }
)
Column(
modifier = Modifier.fillMaxWidth(),
horizontalAlignment = Alignment.CenterHorizontally,
@@ -381,15 +381,14 @@ fun BottomMenuList() {
modifier = Modifier.fillMaxWidth(),
verticalArrangement = Arrangement.spacedBy(ListItemDefaults.SegmentedGap),
) {
defaultMenuList.forEachIndexed { index, item ->
defaultMenuList.forEachIndexed { index, (title, action) ->
SegmentedListItem(
checked = false,
onCheckedChange = { },
onClick = { action() },
shapes = ListItemDefaults.segmentedShapes(
index = index,
count = defaultMenuList.size
),
content = { Text(text = item) },
content = { Text(text = title) },
)
}
}