From 26f89fa5f87c4235a34e619b1e803d04f1139b6c Mon Sep 17 00:00:00 2001 From: Maxime NATUREL Date: Fri, 8 Apr 2022 09:38:49 +0200 Subject: [PATCH] Handling bubble mode view --- .../timeline/style/TimelineMessageLayoutFactory.kt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 04430bf69f..00f86a9a28 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 @@ -46,7 +46,7 @@ class TimelineMessageLayoutFactory @Inject constructor(private val session: Sess EventType.MESSAGE, EventType.ENCRYPTED, EventType.STICKER - ) + EventType.POLL_START + ) + EventType.POLL_START + EventType.STATE_ROOM_BEACON_INFO // Can't be rendered in bubbles, so get back to default layout private val MSG_TYPES_WITHOUT_BUBBLE_LAYOUT = setOf( @@ -58,10 +58,13 @@ class TimelineMessageLayoutFactory @Inject constructor(private val session: Sess MessageType.MSGTYPE_IMAGE, MessageType.MSGTYPE_VIDEO, MessageType.MSGTYPE_STICKER_LOCAL, - MessageType.MSGTYPE_EMOTE + MessageType.MSGTYPE_EMOTE, + MessageType.MSGTYPE_LIVE_LOCATION_STATE, ) private val MSG_TYPES_WITH_TIMESTAMP_AS_OVERLAY = setOf( - MessageType.MSGTYPE_IMAGE, MessageType.MSGTYPE_VIDEO + MessageType.MSGTYPE_IMAGE, + MessageType.MSGTYPE_VIDEO, + MessageType.MSGTYPE_LIVE_LOCATION_STATE, ) } @@ -70,7 +73,7 @@ class TimelineMessageLayoutFactory @Inject constructor(private val session: Sess } private val isRTL: Boolean by lazy { - localeProvider.isRTL() + localeProvider.isRTL() } fun create(params: TimelineItemFactoryParams): TimelineMessageLayout {