fix to hide avatar for 1to1conversations when reaction is received by system message

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2022-04-01 14:14:42 +02:00
parent d7e203ee7a
commit 818a8341a7
No known key found for this signature in database
GPG key ID: C793F8B59F43CE7B

View file

@ -2357,7 +2357,7 @@ class ChatController(args: Bundle) :
// delete reactions system messages
else if (isReactionsMessage(currentMessage)) {
if (!chatMessageMap.containsKey(currentMessage.value.parentMessage.id)) {
adapter?.update(currentMessage.value.parentMessage)
updateAdapterForReaction(currentMessage.value.parentMessage)
}
chatMessageIterator.remove()
@ -2697,6 +2697,15 @@ class ChatController(args: Bundle) :
adapter?.update(messageTemp)
}
private fun updateAdapterForReaction(message: IMessage?) {
val messageTemp = message as ChatMessage
messageTemp.isOneToOneConversation =
currentConversation?.type == Conversation.ConversationType.ROOM_TYPE_ONE_TO_ONE_CALL
adapter?.update(messageTemp)
}
private fun isShowMessageDeletionButton(message: ChatMessage): Boolean {
if (conversationUser == null) return false