From 4a23d3127149bc7ad8b0e1a88ca7b1b3fdcfb548 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 30 Apr 2021 15:27:50 +0200 Subject: [PATCH] Fix regression on sending error indicator color --- .../java/im/vector/app/core/ui/views/SendStateImageView.kt | 5 +++++ vector/src/main/res/layout/item_timeline_event_base.xml | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/app/core/ui/views/SendStateImageView.kt b/vector/src/main/java/im/vector/app/core/ui/views/SendStateImageView.kt index 9acb82581f..308efe09b2 100644 --- a/vector/src/main/java/im/vector/app/core/ui/views/SendStateImageView.kt +++ b/vector/src/main/java/im/vector/app/core/ui/views/SendStateImageView.kt @@ -17,11 +17,13 @@ package im.vector.app.core.ui.views import android.content.Context +import android.content.res.ColorStateList import android.util.AttributeSet import androidx.appcompat.widget.AppCompatImageView import androidx.core.view.isVisible import im.vector.app.R import im.vector.app.features.home.room.detail.timeline.item.SendStateDecoration +import im.vector.app.features.themes.ThemeUtils class SendStateImageView @JvmOverloads constructor( context: Context, @@ -39,16 +41,19 @@ class SendStateImageView @JvmOverloads constructor( isVisible = when (sendState) { SendStateDecoration.SENDING_NON_MEDIA -> { setImageResource(R.drawable.ic_sending_message) + imageTintList = ColorStateList.valueOf(ThemeUtils.getColor(context, R.attr.riotx_text_tertiary)) contentDescription = context.getString(R.string.event_status_a11y_sending) true } SendStateDecoration.SENT -> { setImageResource(R.drawable.ic_message_sent) + imageTintList = ColorStateList.valueOf(ThemeUtils.getColor(context, R.attr.riotx_text_tertiary)) contentDescription = context.getString(R.string.event_status_a11y_sent) true } SendStateDecoration.FAILED -> { setImageResource(R.drawable.ic_sending_message_failed) + imageTintList = null contentDescription = context.getString(R.string.event_status_a11y_failed) true } diff --git a/vector/src/main/res/layout/item_timeline_event_base.xml b/vector/src/main/res/layout/item_timeline_event_base.xml index 0515ace033..282c3f6140 100644 --- a/vector/src/main/res/layout/item_timeline_event_base.xml +++ b/vector/src/main/res/layout/item_timeline_event_base.xml @@ -145,8 +145,8 @@ android:layout_marginBottom="4dp" android:contentDescription="@string/event_status_a11y_sending" android:src="@drawable/ic_sending_message" - android:tint="?riotx_text_tertiary" android:visibility="gone" + tools:tint="?riotx_text_tertiary" tools:visibility="visible" />