Skip to content

Commit

Permalink
feat(conversations): Add federation room badge
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Scherzinger <[email protected]>
  • Loading branch information
AndyScherzinger committed Dec 2, 2024
1 parent 7e11675 commit f54879a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions app/src/main/res/drawable/ic_avatar_federation.xml
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit f54879a

Please sign in to comment.