Skip to content

Commit

Permalink
fix to hide avatar for 1to1conversations when reaction is received by…
Browse files Browse the repository at this point in the history
… system message

Signed-off-by: Marcel Hibbe <[email protected]>
  • Loading branch information
mahibi committed Apr 1, 2022
1 parent 3702069 commit bf46d6e
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2358,7 +2358,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()
Expand Down Expand Up @@ -2708,6 +2708,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

Expand Down

0 comments on commit bf46d6e

Please sign in to comment.