diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/ExtraPadding.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/ExtraPadding.kt index 0d4abdc025..7473bf46af 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/ExtraPadding.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/ExtraPadding.kt @@ -51,3 +51,11 @@ fun TimelineItem.Event.toExtraPadding(): ExtraPadding { // A space and a few unbreakable spaces return ExtraPadding(" " + "\u00A0".repeat(strLen)) } + +fun ExtraPadding.strBigger(): String { + return if (str.isEmpty()) { + str + } else { + str + "\u00A0\u00A0\u00A0" + } +} diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemInformativeView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemInformativeView.kt index c2c63fb6c5..325bd7e3f8 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemInformativeView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemInformativeView.kt @@ -59,7 +59,8 @@ fun TimelineItemInformativeView( fontStyle = FontStyle.Italic, color = MaterialTheme.colorScheme.secondary, fontSize = 14.sp, - text = text + extraPadding.str + // Since the font size is smaller, add more space to extra padding, to not overlap with the timestamp + text = text + extraPadding.strBigger() ) } }