Skip to content

Commit dca5ee8

Browse files
committed
Improve preview rendering.
1 parent 02dd796 commit dca5ee8

File tree

1 file changed

+7
-2
lines changed
  • features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components

1 file changed

+7
-2
lines changed

features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRow.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ import io.element.android.features.messages.impl.timeline.aTimelineItemReactions
6363
import io.element.android.features.messages.impl.timeline.components.event.TimelineItemEventContentView
6464
import io.element.android.features.messages.impl.timeline.components.event.toExtraPadding
6565
import io.element.android.features.messages.impl.timeline.model.TimelineItem
66+
import io.element.android.features.messages.impl.timeline.model.TimelineItemGroupPosition
6667
import io.element.android.features.messages.impl.timeline.model.bubble.BubbleState
6768
import io.element.android.features.messages.impl.timeline.model.event.TimelineItemImageContent
6869
import io.element.android.features.messages.impl.timeline.model.event.TimelineItemLocationContent
@@ -547,6 +548,7 @@ private fun ContentToPreview() {
547548
body = "A long text which will be displayed on several lines and" +
548549
" hopefully can be manually adjusted to test different behaviors."
549550
),
551+
groupPosition = TimelineItemGroupPosition.First,
550552
),
551553
isHighlighted = false,
552554
canReply = true,
@@ -565,6 +567,7 @@ private fun ContentToPreview() {
565567
content = aTimelineItemImageContent().copy(
566568
aspectRatio = 5f
567569
),
570+
groupPosition = TimelineItemGroupPosition.Last,
568571
),
569572
isHighlighted = false,
570573
canReply = true,
@@ -609,7 +612,8 @@ private fun ContentToPreviewWithReply() {
609612
body = "A long text which will be displayed on several lines and" +
610613
" hopefully can be manually adjusted to test different behaviors."
611614
),
612-
inReplyTo = aInReplyToReady(replyContent)
615+
inReplyTo = aInReplyToReady(replyContent),
616+
groupPosition = TimelineItemGroupPosition.First,
613617
),
614618
isHighlighted = false,
615619
canReply = true,
@@ -628,7 +632,8 @@ private fun ContentToPreviewWithReply() {
628632
content = aTimelineItemImageContent().copy(
629633
aspectRatio = 5f
630634
),
631-
inReplyTo = aInReplyToReady(replyContent)
635+
inReplyTo = aInReplyToReady(replyContent),
636+
groupPosition = TimelineItemGroupPosition.Last,
632637
),
633638
isHighlighted = false,
634639
canReply = true,

0 commit comments

Comments
 (0)