Do not compute display name using first and last name if display name exists

This commit is contained in:
Sylvain Berfini 2018-09-12 14:54:17 +02:00
parent 8b5a52a8b1
commit 1e550b5a74

View file

@ -126,12 +126,14 @@ public class LinphoneContact implements Serializable, Comparable<LinphoneContact
firstName = fn; firstName = fn;
lastName = ln; lastName = ln;
if (firstName != null && lastName != null && firstName.length() > 0 && lastName.length() > 0) { if (fullName == null) {
fullName = firstName + " " + lastName; if (firstName != null && lastName != null && firstName.length() > 0 && lastName.length() > 0) {
} else if (firstName != null && firstName.length() > 0) { fullName = firstName + " " + lastName;
fullName = firstName; } else if (firstName != null && firstName.length() > 0) {
} else if (lastName != null && lastName.length() > 0) { fullName = firstName;
fullName = lastName; } else if (lastName != null && lastName.length() > 0) {
fullName = lastName;
}
} }
} }