From 3ff3507fa1a9627e13a39a6ce5edfb4e572470e5 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Thu, 2 Dec 2021 11:50:28 +0000 Subject: [PATCH] forcing the send spacing to always be taking into account - ensures all message lengths are consistent --- .../vector/app/core/ui/views/SendStateImageView.kt | 12 ++++++------ .../src/main/res/layout/item_timeline_event_base.xml | 2 +- 2 files changed, 7 insertions(+), 7 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 cb1d08d2e5..3d710e2b24 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 @@ -20,7 +20,7 @@ import android.content.Context import android.content.res.ColorStateList import android.util.AttributeSet import androidx.appcompat.widget.AppCompatImageView -import androidx.core.view.isVisible +import androidx.core.view.isInvisible import im.vector.app.R import im.vector.app.features.home.room.detail.timeline.item.SendStateDecoration import im.vector.app.features.themes.ThemeUtils @@ -38,28 +38,28 @@ class SendStateImageView @JvmOverloads constructor( } fun render(sendState: SendStateDecoration) { - isVisible = when (sendState) { + isInvisible = when (sendState) { SendStateDecoration.SENDING_NON_MEDIA -> { setImageResource(R.drawable.ic_sending_message) imageTintList = ColorStateList.valueOf(ThemeUtils.getColor(context, R.attr.vctr_content_tertiary)) contentDescription = context.getString(R.string.event_status_a11y_sending) - true + false } SendStateDecoration.SENT -> { setImageResource(R.drawable.ic_message_sent) imageTintList = ColorStateList.valueOf(ThemeUtils.getColor(context, R.attr.vctr_content_tertiary)) contentDescription = context.getString(R.string.event_status_a11y_sent) - true + false } SendStateDecoration.FAILED -> { setImageResource(R.drawable.ic_sending_message_failed) imageTintList = null contentDescription = context.getString(R.string.event_status_a11y_failed) - true + false } SendStateDecoration.SENDING_MEDIA, SendStateDecoration.NONE -> { - false + 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 ed6e501d49..d85dc5cd0d 100644 --- a/vector/src/main/res/layout/item_timeline_event_base.xml +++ b/vector/src/main/res/layout/item_timeline_event_base.xml @@ -152,7 +152,7 @@ android:layout_marginBottom="4dp" android:contentDescription="@string/event_status_a11y_sending" android:src="@drawable/ic_sending_message" - android:visibility="gone" + android:visibility="invisible" tools:tint="?vctr_content_tertiary" tools:visibility="visible" />