mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-12-18 22:52:04 +03:00
Merge pull request #4506 from nextcloud/feat/noid/conversationPublicStatusBadge
Add public and federated room badge
This commit is contained in:
commit
97e2650392
5 changed files with 47 additions and 0 deletions
|
@ -127,6 +127,15 @@ class ConversationItem(
|
|||
} else {
|
||||
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
|
||||
}
|
||||
if (ConversationEnums.ConversationType.ROOM_SYSTEM !== model.type) {
|
||||
val size = DisplayUtils.convertDpToPixel(STATUS_SIZE_IN_DP, appContext)
|
||||
holder.binding.userStatusImage.visibility = View.VISIBLE
|
||||
|
|
11
app/src/main/res/drawable/cutout_circle.xml
Normal file
11
app/src/main/res/drawable/cutout_circle.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Nextcloud Talk - Android Client
|
||||
~
|
||||
~ SPDX-FileCopyrightText: 2024 Andy Scherzinger <info@andy-scherzinger.de>
|
||||
~ 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>
|
15
app/src/main/res/drawable/ic_avatar_federation.xml
Normal file
15
app/src/main/res/drawable/ic_avatar_federation.xml
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!--
|
||||
~ Nextcloud Talk - Android Client
|
||||
~
|
||||
~ SPDX-FileCopyrightText: 2018-2024 Google LLC
|
||||
~ SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960">
|
||||
<path
|
||||
android:fillColor="#ffffff"
|
||||
android:pathData="M480,880q-82,0 -155,-31.5t-127.5,-86Q143,708 111.5,635T80,480q0,-83 31.5,-155.5t86,-127Q252,143 325,111.5T480,80q83,0 155.5,31.5t127,86q54.5,54.5 86,127T880,480q0,82 -31.5,155t-86,127.5q-54.5,54.5 -127,86T480,880ZM480,798q26,-36 45,-75t31,-83L404,640q12,44 31,83t45,75ZM376,782q-18,-33 -31.5,-68.5T322,640L204,640q29,50 72.5,87t99.5,55ZM584,782q56,-18 99.5,-55t72.5,-87L638,640q-9,38 -22.5,73.5T584,782ZM170,560h136q-3,-20 -4.5,-39.5T300,480q0,-21 1.5,-40.5T306,400L170,400q-5,20 -7.5,39.5T160,480q0,21 2.5,40.5T170,560ZM386,560h188q3,-20 4.5,-39.5T580,480q0,-21 -1.5,-40.5T574,400L386,400q-3,20 -4.5,39.5T380,480q0,21 1.5,40.5T386,560ZM654,560h136q5,-20 7.5,-39.5T800,480q0,-21 -2.5,-40.5T790,400L654,400q3,20 4.5,39.5T660,480q0,21 -1.5,40.5T654,560ZM638,320h118q-29,-50 -72.5,-87T584,178q18,33 31.5,68.5T638,320ZM404,320h152q-12,-44 -31,-83t-45,-75q-26,36 -45,75t-31,83ZM204,320h118q9,-38 22.5,-73.5T376,178q-56,18 -99.5,55T204,320Z" />
|
||||
</vector>
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue