mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 12:38:33 +00:00
Show username if appropriate in group chips.
This commit is contained in:
@@ -30,7 +30,7 @@ object SelectedContacts {
|
|||||||
private val chip: ContactChip = itemView.findViewById(R.id.contact_chip)
|
private val chip: ContactChip = itemView.findViewById(R.id.contact_chip)
|
||||||
|
|
||||||
override fun bind(model: Model) {
|
override fun bind(model: Model) {
|
||||||
chip.text = model.recipient.getShortDisplayName(context)
|
chip.text = model.recipient.getShortDisplayNameIncludingUsername(context)
|
||||||
chip.setContact(model.selectedContact)
|
chip.setContact(model.selectedContact)
|
||||||
chip.isCloseIconVisible = true
|
chip.isCloseIconVisible = true
|
||||||
chip.setOnCloseIconClickListener {
|
chip.setOnCloseIconClickListener {
|
||||||
|
|||||||
@@ -650,8 +650,9 @@ public class Recipient {
|
|||||||
String name = Util.getFirstNonEmpty(getGroupName(context),
|
String name = Util.getFirstNonEmpty(getGroupName(context),
|
||||||
getSystemProfileName().getGivenName(),
|
getSystemProfileName().getGivenName(),
|
||||||
getProfileName().getGivenName(),
|
getProfileName().getGivenName(),
|
||||||
getDisplayName(context),
|
getE164().orElse(null),
|
||||||
getUsername().orElse(null));
|
getUsername().orElse(null),
|
||||||
|
getDisplayName(context));
|
||||||
|
|
||||||
return StringUtil.isolateBidi(name);
|
return StringUtil.isolateBidi(name);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user