mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 02:58:07 +00:00
Use searchChatRoomByIdentifier instead of searchChatRoom in the changeDisplayedChatRoom
This commit is contained in:
parent
db72bdf242
commit
08ab9a1078
1 changed files with 18 additions and 18 deletions
|
|
@ -450,8 +450,7 @@ class ConversationsListViewModel: ObservableObject {
|
||||||
func changeDisplayedChatRoom(conversationModel: ConversationModel) {
|
func changeDisplayedChatRoom(conversationModel: ConversationModel) {
|
||||||
CoreContext.shared.doOnCoreQueue { core in
|
CoreContext.shared.doOnCoreQueue { core in
|
||||||
let nilParams: ConferenceParams? = nil
|
let nilParams: ConferenceParams? = nil
|
||||||
if let newChatRoom = core.searchChatRoom(params: nilParams, localAddr: nil, remoteAddr: conversationModel.chatRoom.peerAddress, participants: nil) {
|
if let newChatRoom = core.searchChatRoomByIdentifier(identifier: conversationModel.id) {
|
||||||
if LinphoneUtils.getChatRoomId(room: newChatRoom) == conversationModel.id {
|
|
||||||
if self.sharedMainViewModel.displayedConversation == nil {
|
if self.sharedMainViewModel.displayedConversation == nil {
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
withAnimation {
|
withAnimation {
|
||||||
|
|
@ -468,7 +467,8 @@ class ConversationsListViewModel: ObservableObject {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
|
Log.warn("\(ConversationsListViewModel.TAG) changeDisplayedChatRoom: no chat room found for identifier \(conversationModel.id)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue