mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-25 10:55:55 +03:00
forcing the send spacing to always be taking into account
- ensures all message lengths are consistent
This commit is contained in:
parent
5cfebb764c
commit
3ff3507fa1
2 changed files with 7 additions and 7 deletions
|
@ -20,7 +20,7 @@ import android.content.Context
|
||||||
import android.content.res.ColorStateList
|
import android.content.res.ColorStateList
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import androidx.appcompat.widget.AppCompatImageView
|
import androidx.appcompat.widget.AppCompatImageView
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isInvisible
|
||||||
import im.vector.app.R
|
import im.vector.app.R
|
||||||
import im.vector.app.features.home.room.detail.timeline.item.SendStateDecoration
|
import im.vector.app.features.home.room.detail.timeline.item.SendStateDecoration
|
||||||
import im.vector.app.features.themes.ThemeUtils
|
import im.vector.app.features.themes.ThemeUtils
|
||||||
|
@ -38,28 +38,28 @@ class SendStateImageView @JvmOverloads constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
fun render(sendState: SendStateDecoration) {
|
fun render(sendState: SendStateDecoration) {
|
||||||
isVisible = when (sendState) {
|
isInvisible = when (sendState) {
|
||||||
SendStateDecoration.SENDING_NON_MEDIA -> {
|
SendStateDecoration.SENDING_NON_MEDIA -> {
|
||||||
setImageResource(R.drawable.ic_sending_message)
|
setImageResource(R.drawable.ic_sending_message)
|
||||||
imageTintList = ColorStateList.valueOf(ThemeUtils.getColor(context, R.attr.vctr_content_tertiary))
|
imageTintList = ColorStateList.valueOf(ThemeUtils.getColor(context, R.attr.vctr_content_tertiary))
|
||||||
contentDescription = context.getString(R.string.event_status_a11y_sending)
|
contentDescription = context.getString(R.string.event_status_a11y_sending)
|
||||||
true
|
false
|
||||||
}
|
}
|
||||||
SendStateDecoration.SENT -> {
|
SendStateDecoration.SENT -> {
|
||||||
setImageResource(R.drawable.ic_message_sent)
|
setImageResource(R.drawable.ic_message_sent)
|
||||||
imageTintList = ColorStateList.valueOf(ThemeUtils.getColor(context, R.attr.vctr_content_tertiary))
|
imageTintList = ColorStateList.valueOf(ThemeUtils.getColor(context, R.attr.vctr_content_tertiary))
|
||||||
contentDescription = context.getString(R.string.event_status_a11y_sent)
|
contentDescription = context.getString(R.string.event_status_a11y_sent)
|
||||||
true
|
false
|
||||||
}
|
}
|
||||||
SendStateDecoration.FAILED -> {
|
SendStateDecoration.FAILED -> {
|
||||||
setImageResource(R.drawable.ic_sending_message_failed)
|
setImageResource(R.drawable.ic_sending_message_failed)
|
||||||
imageTintList = null
|
imageTintList = null
|
||||||
contentDescription = context.getString(R.string.event_status_a11y_failed)
|
contentDescription = context.getString(R.string.event_status_a11y_failed)
|
||||||
true
|
false
|
||||||
}
|
}
|
||||||
SendStateDecoration.SENDING_MEDIA,
|
SendStateDecoration.SENDING_MEDIA,
|
||||||
SendStateDecoration.NONE -> {
|
SendStateDecoration.NONE -> {
|
||||||
false
|
true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,7 +152,7 @@
|
||||||
android:layout_marginBottom="4dp"
|
android:layout_marginBottom="4dp"
|
||||||
android:contentDescription="@string/event_status_a11y_sending"
|
android:contentDescription="@string/event_status_a11y_sending"
|
||||||
android:src="@drawable/ic_sending_message"
|
android:src="@drawable/ic_sending_message"
|
||||||
android:visibility="gone"
|
android:visibility="invisible"
|
||||||
tools:tint="?vctr_content_tertiary"
|
tools:tint="?vctr_content_tertiary"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue