Skip to content

Commit

Permalink
feat(conversations): Add public room badge
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Scherzinger <[email protected]>
  • Loading branch information
AndyScherzinger authored and backportbot[bot] committed Dec 3, 2024
1 parent f899278 commit cdb5831
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions app/src/main/res/drawable/cutout_circle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Nextcloud Talk - Android Client
~
~ SPDX-FileCopyrightText: 2024 Andy Scherzinger <[email protected]>
~ SPDX-License-Identifier: GPL-3.0-or-later
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/bg_default" />
</shape>
11 changes: 11 additions & 0 deletions app/src/main/res/layout/rv_item_conversation_with_last_message.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@
android:layout_gravity="bottom|end"
android:contentDescription="@string/nc_account_chooser_active_user"
tools:src="@drawable/emoji_one_category_smileysandpeople"/>

<ImageView
android:id="@+id/public_call_badge"
android:layout_width="18dp"
android:layout_height="18dp"
android:layout_gravity="bottom|end"
android:background="@drawable/cutout_circle"
android:contentDescription="@string/nc_public_call_status"
android:padding="1dp"
android:src="@drawable/ic_avatar_link"
app:tint="@color/no_emphasis_text" />
</FrameLayout>

<RelativeLayout
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ How to translate with transifex:
<string name="nc_call_ringing">RINGING</string>
<string name="nc_connecting_call">Connecting …</string>
<string name="nc_nick_guest">Guest</string>
<string name="nc_public_call_status">Public conversation</string>
<string name="nc_public_call">New public conversation</string>
<string name="nc_public_call_explanation">Public conversations let you invite people from outside through a specially crafted link.</string>
<string name="nc_call_timeout">No response in 45 seconds, tap to try again</string>
Expand Down

0 comments on commit cdb5831

Please sign in to comment.