Skip to content

Commit

Permalink
[contacts] Apply requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lukmccall committed Mar 9, 2020
1 parent 6eb9088 commit 9a43090
Showing 1 changed file with 2 additions and 8 deletions.
Expand Up @@ -188,14 +188,8 @@ public String getLastName() {

@Nullable
public String getDisplayName() {
if (displayName == null) {
if (firstName != null) {
if (lastName != null) {
return String.format("%s %s", firstName, lastName).trim();
}

return firstName;
}
if (displayName == null && firstName != null) {
return lastName == null ? firstName : String.format("%s %s", firstName, lastName).trim();
}

return displayName;
Expand Down

0 comments on commit 9a43090

Please sign in to comment.