Fixed display issue in contacts' search list in chatfragment
This commit is contained in:
parent
b7c21b57f1
commit
fbac8c01cd
1 changed files with 10 additions and 4 deletions
|
@ -1056,7 +1056,13 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
|||
if(ContactsManager.getInstance().hasContacts()) {
|
||||
for (LinphoneContact con : ContactsManager.getInstance().getContacts()) {
|
||||
for (LinphoneNumberOrAddress noa : con.getNumbersOrAddresses()) {
|
||||
list.add(new ContactAddress(con, noa.getValue()));
|
||||
String value = noa.getValue();
|
||||
// Fix for sip:username compatibility issue
|
||||
if (value.startsWith("sip:") && !value.contains("@")) {
|
||||
value = value.substring(4);
|
||||
value = LinphoneUtils.getFullAddressFromUsername(value);
|
||||
}
|
||||
list.add(new ContactAddress(con, value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1094,7 +1100,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
|||
}
|
||||
|
||||
final String a = contact.address;
|
||||
final LinphoneContact c = contact.contact;
|
||||
LinphoneContact c = contact.contact;
|
||||
|
||||
TextView name = (TextView) view.findViewById(R.id.contact_name);
|
||||
name.setText(c.getFullName());
|
||||
|
|
Loading…
Reference in a new issue