Split system names into first / last.

This commit is contained in:
Alex Hart
2021-03-03 09:37:30 -04:00
committed by GitHub
parent dc9fceb8cf
commit fd9c420dc8
15 changed files with 458 additions and 157 deletions

View File

@@ -89,6 +89,13 @@ public final class ProfileName implements Parcelable {
}
}
/**
* Creates a profile name that only contains a given name.
*/
public static @NonNull ProfileName asGiven(@Nullable String givenName) {
return fromParts(givenName, null);
}
/**
* Creates a profile name, trimming chars until it fits the limits.
*/

View File

@@ -74,7 +74,7 @@ class EditGroupProfileRepository implements EditProfileRepository {
String title = groupRecord.getTitle();
return title == null ? "" : title;
})
.or(() -> recipient.getName(context));
.or(() -> recipient.getGroupName(context));
}, nameConsumer::accept);
}