Browse Source

Use fallback name in this case.

pull/2752/head
Benoit Marty 5 months ago
parent
commit
8272b7a16c
  1. 5
      libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectView.kt

5
libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectView.kt

@ -36,6 +36,7 @@ import androidx.compose.runtime.Composable @@ -36,6 +36,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.PreviewParameter
import androidx.compose.ui.unit.dp
@ -235,8 +236,8 @@ private fun RoomSummaryView( @@ -235,8 +236,8 @@ private fun RoomSummaryView(
// Name
Text(
style = ElementTheme.typography.fontBodyLgRegular,
// If name is null, we do not have space to render "No room name", so just use `#` here.
text = summary.name ?: "#",
text = summary.name ?: stringResource(id = CommonStrings.common_no_room_name),
fontStyle = FontStyle.Italic.takeIf { summary.name == null },
color = ElementTheme.colors.textPrimary,
maxLines = 1,
overflow = TextOverflow.Ellipsis

Loading…
Cancel
Save