Use existing method
This commit is contained in:
parent
f2a3bdb68e
commit
2f94fbd7eb
@ -259,9 +259,7 @@ class MessageMenuViewModel @AssistedInject constructor(@Assisted initialState: M
|
||||
MessageType.MSGTYPE_NOTICE,
|
||||
MessageType.MSGTYPE_EMOTE,
|
||||
MessageType.FORMAT_MATRIX_HTML,
|
||||
MessageType.MSGTYPE_LOCATION -> {
|
||||
true
|
||||
}
|
||||
MessageType.MSGTYPE_LOCATION -> true
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
@ -271,9 +269,7 @@ class MessageMenuViewModel @AssistedInject constructor(@Assisted initialState: M
|
||||
return when (type) {
|
||||
MessageType.MSGTYPE_IMAGE,
|
||||
MessageType.MSGTYPE_AUDIO,
|
||||
MessageType.MSGTYPE_VIDEO -> {
|
||||
true
|
||||
}
|
||||
MessageType.MSGTYPE_VIDEO -> true
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
@ -166,11 +166,7 @@ abstract class AbsMessageItem<H : AbsMessageItem.Holder> : BaseEventItem<H>() {
|
||||
root.isClickable = informationData.sendState.isSent()
|
||||
val state = if (informationData.hasPendingEdits) SendState.UNSENT else informationData.sendState
|
||||
textView?.setTextColor(colorProvider.getMessageTextColor(state))
|
||||
failureIndicator?.isVisible = when (informationData.sendState) {
|
||||
SendState.UNDELIVERED,
|
||||
SendState.FAILED_UNKNOWN_DEVICES -> true
|
||||
else -> false
|
||||
}
|
||||
failureIndicator?.isVisible = informationData.sendState.hasFailed()
|
||||
}
|
||||
|
||||
abstract class Holder(@IdRes stubId: Int) : BaseHolder(stubId) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user