chore: improve line break handling (#39)

Reviewed-on: https://git.reya.su/reya/coop-mobile/pulls/39
This commit is contained in:
2026-07-09 03:48:42 +00:00
parent 7a44e836a9
commit c7a646ae73
4 changed files with 19 additions and 9 deletions
@@ -99,11 +99,13 @@ fun Room.uiStateFlow(
val displayMembers = if (isGroup()) members.take(2) else members.take(1)
if (!subject.isNullOrBlank()) {
return flowOf(RoomUiState(name = subject, isGroup = isGroup()))
return flowOf(RoomUiState(name = subject.sanitizeName(), isGroup = isGroup()))
}
return combine(displayMembers.map { nostrViewModel.getMetadata(it) }) { profiles ->
val names = profiles.mapIndexed { i, profile -> profile?.name ?: displayMembers[i].short() }
val names = profiles.mapIndexed { i, profile ->
profile?.name?.sanitizeName() ?: displayMembers[i].short()
}
val name = when {
isGroup() -> {