Fix regression on sending error indicator color

This commit is contained in:
Benoit Marty 2021-04-30 15:27:50 +02:00 committed by Benoit Marty
parent 8ff65b3816
commit 4a23d31271
2 changed files with 7 additions and 2 deletions

View file

@ -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
}

View file

@ -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" />
<ProgressBar
@ -154,11 +154,11 @@
android:layout_width="@dimen/item_event_message_state_size"
android:layout_height="@dimen/item_event_message_state_size"
android:layout_alignBottom="@+id/viewStubContainer"
android:indeterminateTint="?riotx_text_secondary"
android:layout_alignParentEnd="true"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="4dp"
android:indeterminateTint="?riotx_text_secondary"
android:tint="?riotx_text_tertiary"
android:visibility="gone"
tools:visibility="visible" />