From 0cf58068940499d314e7551660696a0a04b1b7e0 Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Thu, 23 Dec 2021 17:52:17 +0100 Subject: [PATCH] Also apply notice transparency to no-bubble style Change-Id: I22af6d8d9d72f624bd88df2e0af2ad99d6a322f0 --- .../features/home/room/detail/timeline/item/AbsMessageItem.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 aa18f53d78..bd3ec88ca1 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 @@ -447,6 +447,9 @@ abstract class AbsMessageItem : AbsBaseMessageItem val defaultRtl = defaultDirection == 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) { BubbleThemeUtils.BUBBLE_STYLE_START, BubbleThemeUtils.BUBBLE_STYLE_BOTH, @@ -470,7 +473,6 @@ abstract class AbsMessageItem : AbsBaseMessageItem } } bubbleView.setBackgroundResource(bubbleRes) - bubbleView.alpha = if (attributes.isNotice) 0.6f else 1f longPadding = 20 shortPadding = 8 } else {