From be77363c34afd0514e898a58c8321b4fd7ab1d36 Mon Sep 17 00:00:00 2001 From: ariskotsomitopoulos Date: Fri, 1 Apr 2022 12:53:28 +0300 Subject: [PATCH] Improved thread rendering in the main timeline --- changelog.d/5151.misc | 1 + .../room/detail/timeline/style/TimelineMessageLayoutFactory.kt | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 changelog.d/5151.misc diff --git a/changelog.d/5151.misc b/changelog.d/5151.misc new file mode 100644 index 0000000000..f80cc2a4d1 --- /dev/null +++ b/changelog.d/5151.misc @@ -0,0 +1 @@ +Improve main timeline thread summary rendering diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/style/TimelineMessageLayoutFactory.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/style/TimelineMessageLayoutFactory.kt index 3e3e9775f8..04430bf69f 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/style/TimelineMessageLayoutFactory.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/style/TimelineMessageLayoutFactory.kt @@ -31,6 +31,7 @@ import org.matrix.android.sdk.api.session.room.model.message.MessageVerification import org.matrix.android.sdk.api.session.room.timeline.TimelineEvent import org.matrix.android.sdk.api.session.room.timeline.getLastMessageContent import org.matrix.android.sdk.api.session.room.timeline.isEdition +import org.matrix.android.sdk.api.session.room.timeline.isRootThread import javax.inject.Inject class TimelineMessageLayoutFactory @Inject constructor(private val session: Session, @@ -91,6 +92,7 @@ class TimelineMessageLayoutFactory @Inject constructor(private val session: Sess nextDisplayableEvent.root.getClearType() !in listOf(EventType.MESSAGE, EventType.STICKER, EventType.ENCRYPTED) || isNextMessageReceivedMoreThanOneHourAgo || isTileTypeMessage(nextDisplayableEvent) || + event.isRootThread() || nextDisplayableEvent.isEdition() val messageLayout = when (layoutSettingsProvider.getLayoutSettings()) {