From 6d1cb063731e1bb915c67a78d158390aa913116d Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Sun, 29 Nov 2020 15:51:04 +0100 Subject: [PATCH] Bubble style none = else Change-Id: I910075b871f55968685f109ac3f729e42be1b384 --- .../detail/timeline/item/AbsMessageItem.kt | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/AbsMessageItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/AbsMessageItem.kt index 007b9ecfae..689d745088 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/AbsMessageItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/AbsMessageItem.kt @@ -322,17 +322,6 @@ abstract class AbsMessageItem : AbsBaseMessageItem val contentInBubble = infoInBubbles(holder.memberNameView.context) when (bubbleStyle) { - BubbleThemeUtils.BUBBLE_STYLE_NONE -> { - bubbleView.background = null - (bubbleView.layoutParams as ViewGroup.MarginLayoutParams).marginStart = 0 - (bubbleView.layoutParams as ViewGroup.MarginLayoutParams).marginEnd = 0 - /* - (bubbleView.layoutParams as RelativeLayout.LayoutParams).marginStart = 0 - (bubbleView.layoutParams as RelativeLayout.LayoutParams).topMargin = 0 - (bubbleView.layoutParams as RelativeLayout.LayoutParams).bottomMargin = 0 - */ - bubbleView.setPadding(0, 0, 0, 0) - } BubbleThemeUtils.BUBBLE_STYLE_START, BubbleThemeUtils.BUBBLE_STYLE_BOTH, BubbleThemeUtils.BUBBLE_STYLE_BOTH_HIDDEN, @@ -451,6 +440,18 @@ abstract class AbsMessageItem : AbsBaseMessageItem } } } + //BubbleThemeUtils.BUBBLE_STYLE_NONE, + else -> { + bubbleView.background = null + (bubbleView.layoutParams as ViewGroup.MarginLayoutParams).marginStart = 0 + (bubbleView.layoutParams as ViewGroup.MarginLayoutParams).marginEnd = 0 + /* + (bubbleView.layoutParams as RelativeLayout.LayoutParams).marginStart = 0 + (bubbleView.layoutParams as RelativeLayout.LayoutParams).topMargin = 0 + (bubbleView.layoutParams as RelativeLayout.LayoutParams).bottomMargin = 0 + */ + bubbleView.setPadding(0, 0, 0, 0) + } } val defaultDirection = holder.eventBaseView.resources.configuration.layoutDirection;