From dab331b9bf902f7a2cfcbb3908233c1b74c0753d Mon Sep 17 00:00:00 2001 From: Florian Renaud Date: Fri, 25 Aug 2023 09:30:05 +0200 Subject: [PATCH] Rename TimestampPosition.Above to Overlay --- .../impl/timeline/components/TimelineItemEventRow.kt | 8 ++++---- .../impl/timeline/components/TimestampPosition.kt | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRow.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRow.kt index 0fd05e4717..90e286030d 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRow.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRow.kt @@ -364,7 +364,7 @@ private fun MessageEventBubbleContent( val timestampPosition = when (event.content) { is TimelineItemImageContent, is TimelineItemVideoContent, - is TimelineItemLocationContent -> TimestampPosition.Above + is TimelineItemLocationContent -> TimestampPosition.Overlay is TimelineItemPollContent -> TimestampPosition.Below else -> TimestampPosition.Default } @@ -396,7 +396,7 @@ private fun MessageEventBubbleContent( timestampModifier: Modifier = Modifier, ) { when (timestampPosition) { - TimestampPosition.Above -> + TimestampPosition.Overlay -> Box(modifier) { ContentView(modifier = contentModifier) TimelineEventTimestampView( @@ -460,14 +460,14 @@ private fun MessageEventBubbleContent( .clip(RoundedCornerShape(6.dp)) .clickable(enabled = true, onClick = inReplyToClick), ) - if (timestampPosition == TimestampPosition.Above) { + if (timestampPosition == TimestampPosition.Overlay) { modifierWithPadding = Modifier.padding(start = 8.dp, end = 8.dp, bottom = 8.dp) contentModifier = Modifier.clip(RoundedCornerShape(12.dp)) } else { contentModifier = Modifier.padding(start = 12.dp, end = 12.dp, top = 0.dp, bottom = 8.dp) } } - timestampPosition != TimestampPosition.Above -> { + timestampPosition != TimestampPosition.Overlay -> { contentModifier = Modifier.padding(start = 12.dp, end = 12.dp, top = 8.dp, bottom = 8.dp) } } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimestampPosition.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimestampPosition.kt index aaae767dbc..7063e07635 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimestampPosition.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimestampPosition.kt @@ -18,9 +18,9 @@ package io.element.android.features.messages.impl.timeline.components enum class TimestampPosition { /** - * Timestamp should be rendered above the timeline event content (eg. image). + * Timestamp should overlay the timeline event content (eg. image). */ - Above, + Overlay, /** * Timestamp should be aligned with the timeline event content if this is possible (eg. text).