mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Fix friends presence
This commit is contained in:
parent
c441e2cb43
commit
9e314aa205
1 changed files with 7 additions and 4 deletions
|
|
@ -131,11 +131,9 @@ final class ContactsManager: ObservableObject {
|
|||
self.linphoneFriendList?.updateSubscriptions()
|
||||
self.friendList?.updateSubscriptions()
|
||||
|
||||
MagicSearchSingleton.shared.searchForContacts(sourceFlags: MagicSearch.Source.Friends.rawValue | MagicSearch.Source.LdapServers.rawValue)
|
||||
|
||||
self.friendListSuscription = self.friendList?.publisher?.onNewSipAddressDiscovered?.postOnCoreQueue { (cbValue: (friendList: FriendList, linphoneFriend: Friend, sipUri: String)) in
|
||||
|
||||
var addedAvatarListModel : [ContactAvatarModel] = []
|
||||
var addedAvatarListModel: [ContactAvatarModel] = []
|
||||
cbValue.linphoneFriend.phoneNumbers.forEach { phone in
|
||||
do {
|
||||
let address = core.interpretUrl(url: phone, applyInternationalPrefix: true)
|
||||
|
|
@ -163,11 +161,16 @@ final class ContactsManager: ObservableObject {
|
|||
DispatchQueue.main.async {
|
||||
self.avatarListModel += addedAvatarListModel
|
||||
}
|
||||
|
||||
MagicSearchSingleton.shared.searchForContacts(sourceFlags: MagicSearch.Source.Friends.rawValue | MagicSearch.Source.LdapServers.rawValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
contactCounter += 1
|
||||
|
||||
if !(contact.givenName.isEmpty && contact.familyName.isEmpty) {
|
||||
contactCounter += 1
|
||||
}
|
||||
})
|
||||
|
||||
} catch let error {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue