From 176568b628c0eb975e7a7ae2e228a83363386a01 Mon Sep 17 00:00:00 2001 From: Marcel Hibbe Date: Mon, 21 Feb 2022 11:05:51 +0100 Subject: [PATCH] show online status AND emoji in conversations info Signed-off-by: Marcel Hibbe --- .../com/nextcloud/talk/adapters/items/UserItem.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/adapters/items/UserItem.java b/app/src/main/java/com/nextcloud/talk/adapters/items/UserItem.java index 68943a16b..9d77fbaf4 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/items/UserItem.java +++ b/app/src/main/java/com/nextcloud/talk/adapters/items/UserItem.java @@ -129,18 +129,19 @@ public class UserItem extends AbstractFlexibleItem } } + if (participant.statusIcon != null && !participant.statusIcon.isEmpty()) { + holder.participantEmoji.setText(participant.statusIcon); + } else { + holder.participantEmoji.setVisibility(View.GONE); + } + if (participant.status != null && participant.status.equals(StatusType.DND.getString())) { setOnlineStateIcon(holder, R.drawable.ic_user_status_dnd_with_border); - } else if (participant.statusIcon != null && !participant.statusIcon.isEmpty()) { - holder.participantOnlineStateImage.setVisibility(View.GONE); - holder.participantEmoji.setVisibility(View.VISIBLE); - holder.participantEmoji.setText(participant.statusIcon); } else if (participant.status != null && participant.status.equals(StatusType.AWAY.getString())) { setOnlineStateIcon(holder, R.drawable.ic_user_status_away_with_border); } else if (participant.status != null && participant.status.equals(StatusType.ONLINE.getString())) { setOnlineStateIcon(holder, R.drawable.online_status_with_border); } else { - holder.participantEmoji.setVisibility(View.GONE); holder.participantOnlineStateImage.setVisibility(View.GONE); } @@ -277,8 +278,6 @@ public class UserItem extends AbstractFlexibleItem } private void setOnlineStateIcon(UserItem.UserItemViewHolder holder, int icon) { - holder.participantEmoji.setVisibility(View.GONE); - holder.participantOnlineStateImage.setVisibility(View.VISIBLE); holder.participantOnlineStateImage.setImageDrawable(ContextCompat.getDrawable(context, icon)); }