Fixed duplicated chat message that could happen when loading a chat room while some aggregrated messages weren't notified yet
This commit is contained in:
parent
791e27f479
commit
f0e8e6cd06
1 changed files with 2 additions and 2 deletions
|
@ -232,10 +232,10 @@ class ChatMessagesListViewModel(private val chatRoom: ChatRoom) : ViewModel() {
|
|||
chatMessage.userData = events.value.orEmpty().size
|
||||
|
||||
val existingEvent = events.value.orEmpty().find { data ->
|
||||
data.eventLog == eventLog
|
||||
data.eventLog.type == EventLog.Type.ConferenceChatMessage && data.eventLog.chatMessage?.messageId == chatMessage.messageId
|
||||
}
|
||||
if (existingEvent != null) {
|
||||
Log.w("[Chat Messages] Found already present chat message, don't add it it's probably the result of an auto download")
|
||||
Log.w("[Chat Messages] Found already present chat message, don't add it it's probably the result of an auto download or an aggregated message received before but notified after the conversation was displayed")
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue