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);
|
SearchResult searchResult = getItem(position);
|
||||||
|
|
||||||
LinphoneContact contact;
|
LinphoneContact contact;
|
||||||
if (searchResult.getAddress() == null) {
|
if (searchResult.getFriend() != null && searchResult.getFriend().getUserData() != null) {
|
||||||
contact =
|
contact = (LinphoneContact) searchResult.getFriend().getUserData();
|
||||||
ContactsManager.getInstance()
|
|
||||||
.findContactFromPhoneNumber(searchResult.getPhoneNumber());
|
|
||||||
} else {
|
} else {
|
||||||
contact =
|
if (searchResult.getAddress() == null) {
|
||||||
ContactsManager.getInstance().findContactFromAddress(searchResult.getAddress());
|
contact =
|
||||||
|
ContactsManager.getInstance()
|
||||||
|
.findContactFromPhoneNumber(searchResult.getPhoneNumber());
|
||||||
|
} else {
|
||||||
|
contact =
|
||||||
|
ContactsManager.getInstance()
|
||||||
|
.findContactFromAddress(searchResult.getAddress());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final String numberOrAddress =
|
final String numberOrAddress =
|
||||||
|
|
Loading…
Reference in a new issue