diff --git a/generate_bubbles.sh b/generate_bubbles.sh index e722f720e4..3faeaace61 100755 --- a/generate_bubbles.sh +++ b/generate_bubbles.sh @@ -85,11 +85,13 @@ function create_msg_bubble() { for is_outgoing in 0 1; do for is_rtl in 0 1; do - for is_notice in 0 1; do + # Notices are handled via transparency and do not need own drawables right now + is_notice=0 + #for is_notice in 0 1; do for has_tail in 0 1; do create_msg_bubble "$is_outgoing" "$is_rtl" "$is_notice" "$has_tail" done - done + #done done done 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 70fdb19f01..aa18f53d78 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 @@ -456,36 +456,21 @@ abstract class AbsMessageItem : AbsBaseMessageItem val longPadding: Int val shortPadding: Int if (BubbleThemeUtils.drawsActualBubbles(bubbleStyle)) { - val bubbleRes = if (attributes.isNotice) { // notice - if (attributes.informationData.showInformation) { // tail - if (reverseBubble) { // outgoing - R.drawable.msg_bubble_notice_outgoing - } else { // incoming - R.drawable.msg_bubble_notice_incoming - } - } else { // notail - if (reverseBubble) { // outgoing - R.drawable.msg_bubble_notice_outgoing_notail - } else { // incoming - R.drawable.msg_bubble_notice_incoming_notail - } + val bubbleRes = if (attributes.informationData.showInformation) { // tail + if (reverseBubble) { // outgoing + R.drawable.msg_bubble_text_outgoing + } else { // incoming + R.drawable.msg_bubble_text_incoming } - } else { // text - if (attributes.informationData.showInformation) { // tail - if (reverseBubble) { // outgoing - R.drawable.msg_bubble_text_outgoing - } else { // incoming - R.drawable.msg_bubble_text_incoming - } - } else { // notail - if (reverseBubble) { // outgoing - R.drawable.msg_bubble_text_outgoing_notail - } else { // incoming - R.drawable.msg_bubble_text_incoming_notail - } + } else { // notail + if (reverseBubble) { // outgoing + R.drawable.msg_bubble_text_outgoing_notail + } else { // incoming + R.drawable.msg_bubble_text_incoming_notail } } bubbleView.setBackgroundResource(bubbleRes) + bubbleView.alpha = if (attributes.isNotice) 0.6f else 1f longPadding = 20 shortPadding = 8 } else { diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageTextItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageTextItem.kt index 3092b46593..e93552df7a 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageTextItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageTextItem.kt @@ -121,10 +121,6 @@ abstract class MessageTextItem : AbsMessageItem() { holder.messageView.onClick(attributes.itemClickListener) holder.messageView.onLongClickIgnoringLinks(attributes.itemLongClickListener) - holder.messageView.setTextColor(ColorProvider(holder.messageView.context).getColorFromAttribute( - if (attributes.isNotice) R.attr.vctr_content_secondary else R.attr.vctr_content_primary - )) - if (bindingOptions?.canUseTextFuture.orFalse()) { holder.messageView.setTextFuture(textFuture) } else { diff --git a/vector/src/main/res/drawable-ldrtl/msg_bubble_notice_incoming.xml b/vector/src/main/res/drawable-ldrtl/msg_bubble_notice_incoming.xml deleted file mode 100644 index 60f4027e61..0000000000 --- a/vector/src/main/res/drawable-ldrtl/msg_bubble_notice_incoming.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vector/src/main/res/drawable-ldrtl/msg_bubble_notice_incoming_notail.xml b/vector/src/main/res/drawable-ldrtl/msg_bubble_notice_incoming_notail.xml deleted file mode 100644 index 05a5833191..0000000000 --- a/vector/src/main/res/drawable-ldrtl/msg_bubble_notice_incoming_notail.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vector/src/main/res/drawable-ldrtl/msg_bubble_notice_outgoing.xml b/vector/src/main/res/drawable-ldrtl/msg_bubble_notice_outgoing.xml deleted file mode 100644 index 3f5c7172a0..0000000000 --- a/vector/src/main/res/drawable-ldrtl/msg_bubble_notice_outgoing.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vector/src/main/res/drawable-ldrtl/msg_bubble_notice_outgoing_notail.xml b/vector/src/main/res/drawable-ldrtl/msg_bubble_notice_outgoing_notail.xml deleted file mode 100644 index 69cfe2f90d..0000000000 --- a/vector/src/main/res/drawable-ldrtl/msg_bubble_notice_outgoing_notail.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vector/src/main/res/drawable/msg_bubble_notice_incoming.xml b/vector/src/main/res/drawable/msg_bubble_notice_incoming.xml deleted file mode 100644 index 4ff4b46b73..0000000000 --- a/vector/src/main/res/drawable/msg_bubble_notice_incoming.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vector/src/main/res/drawable/msg_bubble_notice_incoming_notail.xml b/vector/src/main/res/drawable/msg_bubble_notice_incoming_notail.xml deleted file mode 100644 index 9ca6ac6014..0000000000 --- a/vector/src/main/res/drawable/msg_bubble_notice_incoming_notail.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vector/src/main/res/drawable/msg_bubble_notice_outgoing.xml b/vector/src/main/res/drawable/msg_bubble_notice_outgoing.xml deleted file mode 100644 index 78692bfbd6..0000000000 --- a/vector/src/main/res/drawable/msg_bubble_notice_outgoing.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vector/src/main/res/drawable/msg_bubble_notice_outgoing_notail.xml b/vector/src/main/res/drawable/msg_bubble_notice_outgoing_notail.xml deleted file mode 100644 index 71bf1132c1..0000000000 --- a/vector/src/main/res/drawable/msg_bubble_notice_outgoing_notail.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vector/src/main/res/layout/item_timeline_event_text_message_stub.xml b/vector/src/main/res/layout/item_timeline_event_text_message_stub.xml index 466a6e1d81..9ff12e856e 100644 --- a/vector/src/main/res/layout/item_timeline_event_text_message_stub.xml +++ b/vector/src/main/res/layout/item_timeline_event_text_message_stub.xml @@ -20,8 +20,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="0dp" + android:textColor="?vctr_content_primary" android:layout_gravity="left" - tools:textColor="?vctr_content_primary" tools:text="@sample/messages.json/data/message" tools:ignore="RtlHardcoded" />