Bubbles: remove emote from bubble (keep right/left alignment)

This commit is contained in:
ganfra 2022-01-27 18:18:29 +01:00
parent 4de421d663
commit 881b063d45
2 changed files with 5 additions and 2 deletions

View file

@ -48,7 +48,10 @@ class TimelineMessageLayoutFactory @Inject constructor(private val session: Sess
// Use the bubble layout but without borders // Use the bubble layout but without borders
private val MSG_TYPES_WITH_PSEUDO_BUBBLE_LAYOUT = setOf( 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( private val MSG_TYPES_WITH_TIMESTAMP_AS_OVERLAY = setOf(
MessageType.MSGTYPE_IMAGE, MessageType.MSGTYPE_VIDEO MessageType.MSGTYPE_IMAGE, MessageType.MSGTYPE_VIDEO

View file

@ -103,7 +103,7 @@ class MessageBubbleView @JvmOverloads constructor(context: Context, attrs: Attri
} }
applyTo(views.bubbleView) applyTo(views.bubbleView)
} }
if (messageLayout.isPseudoBubble) { if (messageLayout.isPseudoBubble && messageLayout.timestampAsOverlay) {
views.viewStubContainer.root.setPadding(0, 0, 0, 0) views.viewStubContainer.root.setPadding(0, 0, 0, 0)
} else { } else {
views.viewStubContainer.root.setPadding(horizontalStubPadding, verticalStubPadding, horizontalStubPadding, verticalStubPadding) views.viewStubContainer.root.setPadding(horizontalStubPadding, verticalStubPadding, horizontalStubPadding, verticalStubPadding)