Move 'you' to end of unnamed groups.

This commit is contained in:
Greyson Parrelli 2021-07-06 12:12:53 -04:00 committed by Alex Hart
parent 062e88b24f
commit 383beafdef

View file

@ -454,10 +454,6 @@ public class Recipient {
List<String> names = new LinkedList<>();
if (participants.stream().anyMatch(Recipient::isSelf)) {
names.add(context.getString(R.string.Recipient_you));
}
for (Recipient participant : others) {
String shortName = participant.getShortDisplayName(context);
int count = Objects.requireNonNull(shortNameCounts.getOrDefault(shortName, 0));
@ -469,6 +465,10 @@ public class Recipient {
}
}
if (participants.stream().anyMatch(Recipient::isSelf)) {
names.add(context.getString(R.string.Recipient_you));
}
return Util.join(names, ", ");
} else {
return this.groupName;