Rename TimestampPosition.Above to Overlay
This commit is contained in:
parent
0c9db25715
commit
dab331b9bf
2 changed files with 6 additions and 6 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue