Also apply notice transparency to no-bubble style

Change-Id: I22af6d8d9d72f624bd88df2e0af2ad99d6a322f0
This commit is contained in:
SpiritCroc 2021-12-23 17:52:17 +01:00
parent e8a2b14055
commit 0cf5806894

View file

@ -447,6 +447,9 @@ abstract class AbsMessageItem<H : AbsMessageItem.Holder> : AbsBaseMessageItem<H>
val defaultRtl = defaultDirection == View.LAYOUT_DIRECTION_RTL val defaultRtl = defaultDirection == View.LAYOUT_DIRECTION_RTL
val reverseDirection = if (defaultRtl) View.LAYOUT_DIRECTION_LTR else View.LAYOUT_DIRECTION_RTL val reverseDirection = if (defaultRtl) View.LAYOUT_DIRECTION_LTR else View.LAYOUT_DIRECTION_RTL
// Notice formatting - also relevant if no actual bubbles are shown
bubbleView.alpha = if (attributes.isNotice) 0.6f else 1f
when (bubbleStyle) { when (bubbleStyle) {
BubbleThemeUtils.BUBBLE_STYLE_START, BubbleThemeUtils.BUBBLE_STYLE_START,
BubbleThemeUtils.BUBBLE_STYLE_BOTH, BubbleThemeUtils.BUBBLE_STYLE_BOTH,
@ -470,7 +473,6 @@ abstract class AbsMessageItem<H : AbsMessageItem.Holder> : AbsBaseMessageItem<H>
} }
} }
bubbleView.setBackgroundResource(bubbleRes) bubbleView.setBackgroundResource(bubbleRes)
bubbleView.alpha = if (attributes.isNotice) 0.6f else 1f
longPadding = 20 longPadding = 20
shortPadding = 8 shortPadding = 8
} else { } else {