From 881b063d452b31ab74968a055355e569bf4ce818 Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 27 Jan 2022 18:18:29 +0100 Subject: [PATCH] Bubbles: remove emote from bubble (keep right/left alignment) --- .../detail/timeline/style/TimelineMessageLayoutFactory.kt | 5 ++++- .../home/room/detail/timeline/view/MessageBubbleView.kt | 2 +- 2 files changed, 5 insertions(+), 2 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 952d59e372..e5ba544657 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 @@ -48,7 +48,10 @@ class TimelineMessageLayoutFactory @Inject constructor(private val session: Sess // Use the bubble layout but without borders private val MSG_TYPES_WITH_PSEUDO_BUBBLE_LAYOUT = setOf( - MessageType.MSGTYPE_IMAGE, MessageType.MSGTYPE_VIDEO, MessageType.MSGTYPE_STICKER_LOCAL + MessageType.MSGTYPE_IMAGE, + MessageType.MSGTYPE_VIDEO, + MessageType.MSGTYPE_STICKER_LOCAL, + MessageType.MSGTYPE_EMOTE ) private val MSG_TYPES_WITH_TIMESTAMP_AS_OVERLAY = setOf( MessageType.MSGTYPE_IMAGE, MessageType.MSGTYPE_VIDEO diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/view/MessageBubbleView.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/view/MessageBubbleView.kt index f1250f7efe..4a21cffed6 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/view/MessageBubbleView.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/view/MessageBubbleView.kt @@ -103,7 +103,7 @@ class MessageBubbleView @JvmOverloads constructor(context: Context, attrs: Attri } applyTo(views.bubbleView) } - if (messageLayout.isPseudoBubble) { + if (messageLayout.isPseudoBubble && messageLayout.timestampAsOverlay) { views.viewStubContainer.root.setPadding(0, 0, 0, 0) } else { views.viewStubContainer.root.setPadding(horizontalStubPadding, verticalStubPadding, horizontalStubPadding, verticalStubPadding)