Do not sort contacts only by first letter anymore

This commit is contained in:
Sylvain Berfini 2016-11-23 16:58:41 +01:00
parent 064ffd23e5
commit d930b5533a

View file

@ -87,11 +87,11 @@ public class LinphoneContact implements Serializable, Comparable<LinphoneContact
@Override
public int compareTo(LinphoneContact contact) {
String fullName = getFullName();
String contactFullName = contact.getFullName();
String firstLetter = fullName == null || fullName.isEmpty() ? "" : fullName.substring(0, 1).toUpperCase(Locale.getDefault());
String contactfirstLetter = contactFullName == null || contactFullName.isEmpty() ? "" : contactFullName.substring(0, 1).toUpperCase(Locale.getDefault());
return firstLetter.compareTo(contactfirstLetter);
String fullName = getFullName() != null ? getFullName() : "";
String contactFullName = contact.getFullName() != null ? contact.getFullName() : "";
/*String firstLetter = fullName == null || fullName.isEmpty() ? "" : fullName.substring(0, 1).toUpperCase(Locale.getDefault());
String contactfirstLetter = contactFullName == null || contactFullName.isEmpty() ? "" : contactFullName.substring(0, 1).toUpperCase(Locale.getDefault());*/
return fullName.compareTo(contactFullName);
}
public void setFullName(String name) {