From cdb58315ad8b1f8a2257051cd50dc0d1fce5af06 Mon Sep 17 00:00:00 2001 From: Andy Scherzinger Date: Mon, 2 Dec 2024 17:01:21 +0100 Subject: [PATCH] feat(conversations): Add public room badge Signed-off-by: Andy Scherzinger --- .../nextcloud/talk/adapters/items/ConversationItem.kt | 5 +++++ app/src/main/res/drawable/cutout_circle.xml | 11 +++++++++++ .../layout/rv_item_conversation_with_last_message.xml | 11 +++++++++++ app/src/main/res/values/strings.xml | 1 + 4 files changed, 28 insertions(+) create mode 100644 app/src/main/res/drawable/cutout_circle.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 f03b815a3c..d62a36b83a 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 @@ -127,6 +127,11 @@ class ConversationItem( } else { holder.binding.favoriteConversationImageView.visibility = View.GONE } + if (ConversationEnums.ConversationType.ROOM_PUBLIC_CALL == model.type) { + holder.binding.publicCallBadge.visibility = View.VISIBLE + } else { + holder.binding.publicCallBadge.visibility = View.GONE + } if (ConversationEnums.ConversationType.ROOM_SYSTEM !== model.type) { val size = DisplayUtils.convertDpToPixel(STATUS_SIZE_IN_DP, appContext) holder.binding.userStatusImage.visibility = View.VISIBLE diff --git a/app/src/main/res/drawable/cutout_circle.xml b/app/src/main/res/drawable/cutout_circle.xml new file mode 100644 index 0000000000..c48a09ed1c --- /dev/null +++ b/app/src/main/res/drawable/cutout_circle.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/app/src/main/res/layout/rv_item_conversation_with_last_message.xml b/app/src/main/res/layout/rv_item_conversation_with_last_message.xml index f7b21e4b98..b79e3fe8a6 100644 --- a/app/src/main/res/layout/rv_item_conversation_with_last_message.xml +++ b/app/src/main/res/layout/rv_item_conversation_with_last_message.xml @@ -46,6 +46,17 @@ android:layout_gravity="bottom|end" android:contentDescription="@string/nc_account_chooser_active_user" tools:src="@drawable/emoji_one_category_smileysandpeople"/> + + RINGING Connecting … Guest + Public conversation New public conversation Public conversations let you invite people from outside through a specially crafted link. No response in 45 seconds, tap to try again