Fixed contacts list issue when creating a chat room or a conference
This commit is contained in:
parent
a1f9b95432
commit
d1d4ce558a
1 changed files with 14 additions and 7 deletions
|
@ -59,13 +59,20 @@ class ContactSelectionData(private val searchResult: SearchResult) : ContactData
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun searchMatchingContact() {
|
private fun searchMatchingContact() {
|
||||||
val address = searchResult.address
|
val friend = searchResult.friend
|
||||||
if (address != null) {
|
if (friend != null) {
|
||||||
contact.value = coreContext.contactsManager.findContactByAddress(address)
|
contact.value = friend
|
||||||
displayName.value = searchResult.friend?.name ?: LinphoneUtils.getDisplayName(address)
|
displayName.value = friend.name
|
||||||
} else if (searchResult.phoneNumber != null) {
|
} else {
|
||||||
contact.value = coreContext.contactsManager.findContactByPhoneNumber(searchResult.phoneNumber.orEmpty())
|
val address = searchResult.address
|
||||||
displayName.value = searchResult.friend?.name ?: searchResult.phoneNumber.orEmpty()
|
if (address != null) {
|
||||||
|
contact.value = coreContext.contactsManager.findContactByAddress(address)
|
||||||
|
displayName.value = LinphoneUtils.getDisplayName(address)
|
||||||
|
} else if (searchResult.phoneNumber != null) {
|
||||||
|
contact.value =
|
||||||
|
coreContext.contactsManager.findContactByPhoneNumber(searchResult.phoneNumber.orEmpty())
|
||||||
|
displayName.value = searchResult.phoneNumber.orEmpty()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue