Fixed multiple contacts using same address or phone number in magic search results
This commit is contained in:
parent
3080075568
commit
eb190ae525
1 changed files with 11 additions and 6 deletions
|
@ -85,13 +85,18 @@ public class SearchContactsAdapter extends RecyclerView.Adapter<SearchContactVie
|
|||
SearchResult searchResult = getItem(position);
|
||||
|
||||
LinphoneContact contact;
|
||||
if (searchResult.getAddress() == null) {
|
||||
contact =
|
||||
ContactsManager.getInstance()
|
||||
.findContactFromPhoneNumber(searchResult.getPhoneNumber());
|
||||
if (searchResult.getFriend() != null && searchResult.getFriend().getUserData() != null) {
|
||||
contact = (LinphoneContact) searchResult.getFriend().getUserData();
|
||||
} else {
|
||||
contact =
|
||||
ContactsManager.getInstance().findContactFromAddress(searchResult.getAddress());
|
||||
if (searchResult.getAddress() == null) {
|
||||
contact =
|
||||
ContactsManager.getInstance()
|
||||
.findContactFromPhoneNumber(searchResult.getPhoneNumber());
|
||||
} else {
|
||||
contact =
|
||||
ContactsManager.getInstance()
|
||||
.findContactFromAddress(searchResult.getAddress());
|
||||
}
|
||||
}
|
||||
|
||||
final String numberOrAddress =
|
||||
|
|
Loading…
Reference in a new issue