Rename TimestampPosition.Above to Overlay
This commit is contained in:
parent
8aebb94006
commit
875c38a191
2 changed files with 6 additions and 6 deletions
|
|
@ -364,7 +364,7 @@ private fun MessageEventBubbleContent(
|
||||||
val timestampPosition = when (event.content) {
|
val timestampPosition = when (event.content) {
|
||||||
is TimelineItemImageContent,
|
is TimelineItemImageContent,
|
||||||
is TimelineItemVideoContent,
|
is TimelineItemVideoContent,
|
||||||
is TimelineItemLocationContent -> TimestampPosition.Above
|
is TimelineItemLocationContent -> TimestampPosition.Overlay
|
||||||
is TimelineItemPollContent -> TimestampPosition.Below
|
is TimelineItemPollContent -> TimestampPosition.Below
|
||||||
else -> TimestampPosition.Default
|
else -> TimestampPosition.Default
|
||||||
}
|
}
|
||||||
|
|
@ -396,7 +396,7 @@ private fun MessageEventBubbleContent(
|
||||||
timestampModifier: Modifier = Modifier,
|
timestampModifier: Modifier = Modifier,
|
||||||
) {
|
) {
|
||||||
when (timestampPosition) {
|
when (timestampPosition) {
|
||||||
TimestampPosition.Above ->
|
TimestampPosition.Overlay ->
|
||||||
Box(modifier) {
|
Box(modifier) {
|
||||||
ContentView(modifier = contentModifier)
|
ContentView(modifier = contentModifier)
|
||||||
TimelineEventTimestampView(
|
TimelineEventTimestampView(
|
||||||
|
|
@ -460,14 +460,14 @@ private fun MessageEventBubbleContent(
|
||||||
.clip(RoundedCornerShape(6.dp))
|
.clip(RoundedCornerShape(6.dp))
|
||||||
.clickable(enabled = true, onClick = inReplyToClick),
|
.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)
|
modifierWithPadding = Modifier.padding(start = 8.dp, end = 8.dp, bottom = 8.dp)
|
||||||
contentModifier = Modifier.clip(RoundedCornerShape(12.dp))
|
contentModifier = Modifier.clip(RoundedCornerShape(12.dp))
|
||||||
} else {
|
} else {
|
||||||
contentModifier = Modifier.padding(start = 12.dp, end = 12.dp, top = 0.dp, bottom = 8.dp)
|
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)
|
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 {
|
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).
|
* 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