Display Roster name in roster activity

This commit is contained in:
Paul Schaub 2019-09-01 02:55:19 +02:00
parent ac4ff2527b
commit f773680288
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 5 additions and 5 deletions

View file

@ -65,8 +65,8 @@ public class RosterRecyclerViewAdapter
@BindView(R.id.roster_entry__jid)
TextView jidView;
@BindView(R.id.roster_entry__nickname)
TextView nicknameView;
@BindView(R.id.roster_entry__name)
TextView nameView;
@BindView(R.id.roster_entry__avatar)
CircleImageView avatarView;
@ -81,8 +81,8 @@ public class RosterRecyclerViewAdapter
}
void bind(RoomContactModel contactModel) {
String nick = contactModel.getNickname();
nicknameView.setText(nick != null ? nick : "");
String name = contactModel.getRosterName();
nameView.setText(name != null ? name : contactModel.getEntity().getJid().getLocalpart().asUnescapedString());
EntityBareJid jid = contactModel.getEntity().getJid();
jidView.setText(jid.toString());
jidView.setTextColor(ColorUtil.consistentColor(jid.toString(), new ConsistentColor.ConsistentColorSettings(ConsistentColor.Deficiency.none)));

View file

@ -21,7 +21,7 @@
tools:srcCompat="@drawable/aldrin" />
<TextView
android:id="@+id/roster_entry__nickname"
android:id="@+id/roster_entry__name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="@tools:sample/full_names"