Update friend list subscriptions on Core queue

This commit is contained in:
Benoit Martins 2025-09-15 15:52:34 +02:00
parent a2564c4cc0
commit b36f220911

View file

@ -452,10 +452,12 @@ final class ContactsManager: ObservableObject {
}
dispatchGroup.notify(queue: .main) {
MagicSearchSingleton.shared.searchForContacts()
if let linphoneFL = self.tempRemoteFriendList {
linphoneFL.updateSubscriptions()
}
self.coreContext.doOnCoreQueue { _ in
MagicSearchSingleton.shared.searchForContacts()
if let linphoneFL = self.tempRemoteFriendList {
linphoneFL.updateSubscriptions()
}
}
}
}
},
@ -507,9 +509,11 @@ final class ContactsManager: ObservableObject {
}
dispatchGroup.notify(queue: .main) {
MagicSearchSingleton.shared.searchForContacts()
if let linphoneFL = self.tempRemoteFriendList {
linphoneFL.updateSubscriptions()
self.coreContext.doOnCoreQueue { _ in
MagicSearchSingleton.shared.searchForContacts()
if let linphoneFL = self.tempRemoteFriendList {
linphoneFL.updateSubscriptions()
}
}
}
}
@ -550,6 +554,8 @@ final class ContactsManager: ObservableObject {
}
)
self.friendListDelegate = friendListDelegateTmp
CoreContext.shared.mCore.friendsLists.forEach { friendList in
friendList.addDelegate(delegate: friendListDelegateTmp)
}
@ -593,8 +599,10 @@ final class ContactsManager: ObservableObject {
}
func updateSubscriptionsLinphoneList() {
if let linphoneFL = self.linphoneFriendList {
linphoneFL.updateSubscriptions()
self.coreContext.doOnCoreQueue { _ in
if let linphoneFL = self.linphoneFriendList {
linphoneFL.updateSubscriptions()
}
}
}
}