chore: fix some crash and performance issues (#45)

Reviewed-on: #45
This commit was merged in pull request #45.
This commit is contained in:
2026-07-15 12:44:28 +00:00
parent 1485a767ed
commit 30191170f1
11 changed files with 163 additions and 113 deletions

View File

@@ -695,8 +695,7 @@ fun NewRequests(requests: List<Room>) {
@Composable
fun ChatRoom(room: Room, onClick: () -> Unit) {
val profileCache = LocalProfileCache.current
val roomState by room.uiStateFlow(profileCache)
.collectAsStateWithLifecycle(RoomUiState())
val roomState by room.uiStateFlow(profileCache).collectAsStateWithLifecycle(RoomUiState())
ListItem(
modifier = Modifier.clickable(onClick = onClick),

View File

@@ -397,7 +397,7 @@ fun ContactListItem(
supportingContent = { Text(text = pubkey.short()) },
content = {
Text(
text = profile?.name ?: "",
text = profile?.name ?: "Unknown",
style = MaterialTheme.typography.titleMediumEmphasized,
)
}