mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-26 07:38:09 +00:00
Fix first message display when displaying old messages
This commit is contained in:
parent
6b93a7ef5e
commit
ceca9acc21
1 changed files with 4 additions and 2 deletions
|
|
@ -1075,7 +1075,9 @@ class ConversationViewModel: ObservableObject {
|
|||
let addressPrecCleaned = index > 0 ? historyEvents[index - 1].chatMessage?.fromAddress?.clone() : chatMessage.fromAddress?.clone()
|
||||
addressPrecCleaned?.clean()
|
||||
|
||||
let addressNextCleaned = index <= historyEvents.count - 2 ? historyEvents[index + 1].chatMessage?.fromAddress?.clone() : chatMessage.fromAddress?.clone()
|
||||
let addressNextCleaned = index <= historyEvents.count - 2
|
||||
? historyEvents[index + 1].chatMessage?.fromAddress?.clone()
|
||||
: self.conversationMessagesSection[0].rows.last?.eventModel.eventLog.chatMessage?.fromAddress?.clone()
|
||||
addressNextCleaned?.clean()
|
||||
|
||||
let addressCleaned = chatMessage.fromAddress?.clone()
|
||||
|
|
@ -1086,7 +1088,7 @@ class ConversationViewModel: ObservableObject {
|
|||
}
|
||||
|
||||
let isFirstMessageIncomingTmp = index > 0 ? addressPrecCleaned?.asStringUriOnly() != addressCleaned?.asStringUriOnly() : true
|
||||
let isFirstMessageOutgoingTmp = index <= historyEvents.count - 2 ? addressNextCleaned?.asStringUriOnly() != addressCleaned?.asStringUriOnly() : true
|
||||
let isFirstMessageOutgoingTmp = addressNextCleaned?.asStringUriOnly() != addressCleaned?.asStringUriOnly()
|
||||
|
||||
let isFirstMessageTmp = chatMessage.isOutgoing ? isFirstMessageOutgoingTmp : isFirstMessageIncomingTmp
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue