From 5921442e6817d05a3faaab96f1ff2f38c2437633 Mon Sep 17 00:00:00 2001 From: Marcel Hibbe Date: Wed, 23 Feb 2022 13:21:24 +0100 Subject: [PATCH] hide status of "Talk updates" conversation Signed-off-by: Marcel Hibbe --- .../talk/adapters/items/ConversationItem.java | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/adapters/items/ConversationItem.java b/app/src/main/java/com/nextcloud/talk/adapters/items/ConversationItem.java index bf171f4d27..1a9be11b00 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/items/ConversationItem.java +++ b/app/src/main/java/com/nextcloud/talk/adapters/items/ConversationItem.java @@ -197,16 +197,21 @@ public void bindViewHolder(FlexibleAdapter adapter, ConversationItemV holder.pinnedConversationImageView.setVisibility(View.GONE); } - if (status != null && status.getStatus().equals(StatusType.DND.getString())) { - setOnlineStateIcon(holder, R.drawable.ic_user_status_dnd_with_border); - } else if (status != null && status.getIcon() != null && !status.getIcon().isEmpty()) { - holder.userStatusOnlineState.setVisibility(View.GONE); - holder.userStatusEmoji.setVisibility(View.VISIBLE); - holder.userStatusEmoji.setText(status.getIcon()); - } else if (status != null && status.getStatus().equals(StatusType.AWAY.getString())) { - setOnlineStateIcon(holder, R.drawable.ic_user_status_away_with_border); - } else if (status != null && status.getStatus().equals(StatusType.ONLINE.getString())) { - setOnlineStateIcon(holder, R.drawable.online_status_with_border); + if (!Conversation.ConversationType.ROOM_SYSTEM.equals(conversation.getType())) { + if (status != null && status.getStatus().equals(StatusType.DND.getString())) { + setOnlineStateIcon(holder, R.drawable.ic_user_status_dnd_with_border); + } else if (status != null && status.getIcon() != null && !status.getIcon().isEmpty()) { + holder.userStatusOnlineState.setVisibility(View.GONE); + holder.userStatusEmoji.setVisibility(View.VISIBLE); + holder.userStatusEmoji.setText(status.getIcon()); + } else if (status != null && status.getStatus().equals(StatusType.AWAY.getString())) { + setOnlineStateIcon(holder, R.drawable.ic_user_status_away_with_border); + } else if (status != null && status.getStatus().equals(StatusType.ONLINE.getString())) { + setOnlineStateIcon(holder, R.drawable.online_status_with_border); + } else { + holder.userStatusEmoji.setVisibility(View.GONE); + holder.userStatusOnlineState.setVisibility(View.GONE); + } } else { holder.userStatusEmoji.setVisibility(View.GONE); holder.userStatusOnlineState.setVisibility(View.GONE);