From 67711038695d6246df0278dad14cd04ff7a669e6 Mon Sep 17 00:00:00 2001 From: Andy Scherzinger Date: Mon, 2 Dec 2024 17:40:56 +0100 Subject: [PATCH] feat(conversations): Add federation room badge Signed-off-by: Andy Scherzinger --- .../talk/adapters/items/ConversationItem.kt | 4 ++++ .../main/res/drawable/ic_avatar_federation.xml | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 app/src/main/res/drawable/ic_avatar_federation.xml diff --git a/app/src/main/java/com/nextcloud/talk/adapters/items/ConversationItem.kt b/app/src/main/java/com/nextcloud/talk/adapters/items/ConversationItem.kt index d62a36b83..64c3f171e 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/items/ConversationItem.kt +++ b/app/src/main/java/com/nextcloud/talk/adapters/items/ConversationItem.kt @@ -128,6 +128,10 @@ class ConversationItem( holder.binding.favoriteConversationImageView.visibility = View.GONE } if (ConversationEnums.ConversationType.ROOM_PUBLIC_CALL == model.type) { + holder.binding.publicCallBadge.setImageResource(R.drawable.ic_avatar_link) + holder.binding.publicCallBadge.visibility = View.VISIBLE + } else if (model.remoteServer?.isNotEmpty() == true) { + holder.binding.publicCallBadge.setImageResource(R.drawable.ic_avatar_federation) holder.binding.publicCallBadge.visibility = View.VISIBLE } else { holder.binding.publicCallBadge.visibility = View.GONE diff --git a/app/src/main/res/drawable/ic_avatar_federation.xml b/app/src/main/res/drawable/ic_avatar_federation.xml new file mode 100644 index 000000000..221b34e15 --- /dev/null +++ b/app/src/main/res/drawable/ic_avatar_federation.xml @@ -0,0 +1,15 @@ + + + +