mirror of
https://codeberg.org/Mercury-IM/Mercury-IM
synced 2025-09-11 03:09:45 +02:00
Display Roster name in roster activity
This commit is contained in:
parent
ac4ff2527b
commit
f773680288
2 changed files with 5 additions and 5 deletions
|
@ -65,8 +65,8 @@ public class RosterRecyclerViewAdapter
|
||||||
@BindView(R.id.roster_entry__jid)
|
@BindView(R.id.roster_entry__jid)
|
||||||
TextView jidView;
|
TextView jidView;
|
||||||
|
|
||||||
@BindView(R.id.roster_entry__nickname)
|
@BindView(R.id.roster_entry__name)
|
||||||
TextView nicknameView;
|
TextView nameView;
|
||||||
|
|
||||||
@BindView(R.id.roster_entry__avatar)
|
@BindView(R.id.roster_entry__avatar)
|
||||||
CircleImageView avatarView;
|
CircleImageView avatarView;
|
||||||
|
@ -81,8 +81,8 @@ public class RosterRecyclerViewAdapter
|
||||||
}
|
}
|
||||||
|
|
||||||
void bind(RoomContactModel contactModel) {
|
void bind(RoomContactModel contactModel) {
|
||||||
String nick = contactModel.getNickname();
|
String name = contactModel.getRosterName();
|
||||||
nicknameView.setText(nick != null ? nick : "");
|
nameView.setText(name != null ? name : contactModel.getEntity().getJid().getLocalpart().asUnescapedString());
|
||||||
EntityBareJid jid = contactModel.getEntity().getJid();
|
EntityBareJid jid = contactModel.getEntity().getJid();
|
||||||
jidView.setText(jid.toString());
|
jidView.setText(jid.toString());
|
||||||
jidView.setTextColor(ColorUtil.consistentColor(jid.toString(), new ConsistentColor.ConsistentColorSettings(ConsistentColor.Deficiency.none)));
|
jidView.setTextColor(ColorUtil.consistentColor(jid.toString(), new ConsistentColor.ConsistentColorSettings(ConsistentColor.Deficiency.none)));
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
tools:srcCompat="@drawable/aldrin" />
|
tools:srcCompat="@drawable/aldrin" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/roster_entry__nickname"
|
android:id="@+id/roster_entry__name"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:text="@tools:sample/full_names"
|
tools:text="@tools:sample/full_names"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue