@@ -46,6 +46,7 @@ import io.element.android.features.home.impl.model.RoomListRoomSummaryProvider
4646import io.element.android.features.home.impl.model.RoomSummaryDisplayType
4747import io.element.android.features.home.impl.roomlist.RoomListEvents
4848import io.element.android.libraries.core.extensions.orEmpty
49+ import io.element.android.libraries.core.extensions.toSafeLength
4950import io.element.android.libraries.designsystem.atomic.atoms.UnreadIndicatorAtom
5051import io.element.android.libraries.designsystem.atomic.molecules.InviteButtonsRowMolecule
5152import io.element.android.libraries.designsystem.components.avatar.Avatar
@@ -227,7 +228,7 @@ private fun NameAndTimestampRow(
227228 // Name
228229 Text (
229230 style = ElementTheme .typography.fontBodyLgMedium,
230- text = name ? : stringResource(id = CommonStrings .common_no_room_name),
231+ text = name?.toSafeLength(ellipsize = true ) ? : stringResource(id = CommonStrings .common_no_room_name),
231232 fontStyle = FontStyle .Italic .takeIf { name == null },
232233 color = ElementTheme .colors.roomListRoomName,
233234 maxLines = 1 ,
@@ -380,7 +381,7 @@ private fun InviteNameAndIndicatorRow(
380381 Text (
381382 modifier = Modifier .weight(1f ),
382383 style = ElementTheme .typography.fontBodyLgMedium,
383- text = name ? : stringResource(id = CommonStrings .common_no_room_name),
384+ text = name?.toSafeLength(ellipsize = true ) ? : stringResource(id = CommonStrings .common_no_room_name),
384385 fontStyle = FontStyle .Italic .takeIf { name == null },
385386 color = ElementTheme .colors.roomListRoomName,
386387 maxLines = 1 ,
0 commit comments