Now allow duplicate contacts to be displayed (useful if you have a local contact AND the contact exists with more informations in a LDAP server)

This commit is contained in:
QuentinArguillere 2022-06-22 10:47:56 +02:00
parent 62af703582
commit 7cb6b4e2c5

View file

@ -100,13 +100,9 @@ import linphonesw
@objc func getLastSearchContacts() -> [Contact] {
if (needUpdateLastSearchContacts) {
lastSearchContacts = []
var addedContactNames : [String] = []
for res in magicSearch.lastSearch {
if let contact = searchAndAddMatchingContact(searchResult: res) {
if (!addedContactNames.contains(contact.displayName)) {
addedContactNames.append(contact.displayName)
lastSearchContacts.append(contact)
}
lastSearchContacts.append(contact)
}
}
needUpdateLastSearchContacts = false