From c58328f94e34d7833c6e79ceb5f54a6d185b2ea3 Mon Sep 17 00:00:00 2001 From: Valere Date: Mon, 22 Jul 2019 23:34:40 +0200 Subject: [PATCH] cleaning / review --- CHANGES.md | 2 +- .../home/room/detail/timeline/item/AbsMessageItem.kt | 3 +-- .../room/detail/timeline/item/MessageInformationData.kt | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index cc5689d4a6..909b8512cd 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,7 +5,7 @@ Features: - Improvements: - - + - UI for pending edits (#193) Other changes: - diff --git a/vector/src/main/java/im/vector/riotx/features/home/room/detail/timeline/item/AbsMessageItem.kt b/vector/src/main/java/im/vector/riotx/features/home/room/detail/timeline/item/AbsMessageItem.kt index 6e4f499486..6f7f5b86b2 100644 --- a/vector/src/main/java/im/vector/riotx/features/home/room/detail/timeline/item/AbsMessageItem.kt +++ b/vector/src/main/java/im/vector/riotx/features/home/room/detail/timeline/item/AbsMessageItem.kt @@ -164,8 +164,7 @@ abstract class AbsMessageItem : BaseEventItem() { protected fun renderSendState(root: View, textView: TextView?) { root.isClickable = informationData.sendState.isSent() - val state = SendState.UNSENT.takeIf { informationData.hasPendingEdits } - ?: informationData.sendState + val state = if (informationData.hasPendingEdits) SendState.UNSENT else informationData.sendState textView?.setTextColor(colorProvider.getMessageTextColor(state)) } diff --git a/vector/src/main/java/im/vector/riotx/features/home/room/detail/timeline/item/MessageInformationData.kt b/vector/src/main/java/im/vector/riotx/features/home/room/detail/timeline/item/MessageInformationData.kt index 092f8ce745..31b92c0e0e 100644 --- a/vector/src/main/java/im/vector/riotx/features/home/room/detail/timeline/item/MessageInformationData.kt +++ b/vector/src/main/java/im/vector/riotx/features/home/room/detail/timeline/item/MessageInformationData.kt @@ -30,9 +30,9 @@ data class MessageInformationData( val memberName: CharSequence? = null, val showInformation: Boolean = true, /*List of reactions (emoji,count,isSelected)*/ - var orderedReactionList: List? = null, - var hasBeenEdited: Boolean = false, - var hasPendingEdits: Boolean = false + val orderedReactionList: List? = null, + val hasBeenEdited: Boolean = false, + val hasPendingEdits: Boolean = false ) : Parcelable