User display name overflows in timeline messages (#2767)

* User display name overflows in timeline messages

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
Jorge Martin Espinosa 2024-04-29 19:26:58 +02:00 committed by GitHub
parent d9c4c189af
commit eaeebf9e75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 10 additions and 6 deletions

View file

@ -93,6 +93,7 @@ private fun RowScope.MainText(
text = text,
style = style,
color = color,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
)
}
@ -117,6 +118,7 @@ private fun RowScope.SecondaryText(
text = text,
style = style,
color = MaterialTheme.colorScheme.secondary,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
)
}

View file

@ -701,6 +701,7 @@ internal fun TimelineItemEventRowPreview() = ElementPreview {
sequenceOf(false, true).forEach { isMine ->
ATimelineItemEventRow(
event = aTimelineItemEvent(
senderDisplayName = "Sender with a super long name that should ellipsize",
isMine = isMine,
content = aTimelineItemTextContent().copy(
body = "A long text which will be displayed on several lines and" +