Add public room indicator to RoomDetailFragment & RoomProfileFragment

This commit is contained in:
ariskotsomitopoulos 2021-10-06 19:08:27 +03:00
parent 9ab59a543d
commit e4c3457f37
4 changed files with 32 additions and 1 deletions

View File

@ -1433,6 +1433,7 @@ class RoomDetailFragment @Inject constructor(
renderSubTitle(typingMessage, roomSummary.topic)
views.roomToolbarDecorationImageView.render(roomSummary.roomEncryptionTrustLevel)
views.roomToolbarPresenceImageView.render(roomSummary.isDirect, roomSummary.directUserPresence)
views.roomToolbarPublicImageView.isVisible = roomSummary.isPublic && !roomSummary.isDirect
}
}

View File

@ -220,6 +220,7 @@ class RoomProfileFragment @Inject constructor(
headerViews.roomProfileDecorationImageView.render(it.roomEncryptionTrustLevel)
views.matrixProfileDecorationToolbarAvatarImageView.render(it.roomEncryptionTrustLevel)
headerViews.roomProfilePresenceImageView.render(it.isDirect, it.directUserPresence)
headerViews.roomProfilePublicImageView.isVisible = it.isPublic && !it.isDirect
}
}
roomProfileController.setData(state)

View File

@ -53,7 +53,6 @@
app:layout_constraintStart_toEndOf="@+id/roomToolbarAvatarImageView"
app:layout_constraintTop_toTopOf="@+id/roomToolbarTitleView" />
<im.vector.app.core.ui.views.PresenceStateImageView
android:id="@+id/roomToolbarPresenceImageView"
android:layout_width="12dp"
@ -68,6 +67,21 @@
tools:src="@drawable/ic_presence_offline"
tools:visibility="visible" />
<ImageView
android:id="@+id/roomToolbarPublicImageView"
android:layout_width="13dp"
android:layout_height="13dp"
android:background="@drawable/background_circle"
android:contentDescription="@string/a11y_public_room"
android:padding="1dp"
android:src="@drawable/ic_public_room"
android:visibility="gone"
app:layout_constraintCircle="@+id/roomToolbarAvatarImageView"
app:layout_constraintCircleAngle="135"
app:layout_constraintCircleRadius="20dp"
tools:ignore="MissingConstraints"
tools:visibility="visible" />
<TextView
android:id="@+id/roomToolbarTitleView"
style="@style/Widget.Vector.TextView.HeadlineMedium"

View File

@ -35,6 +35,21 @@
tools:src="@drawable/ic_presence_offline"
tools:visibility="visible" />
<ImageView
android:id="@+id/roomProfilePublicImageView"
android:layout_width="28dp"
android:layout_height="28dp"
android:background="@drawable/background_circle"
android:contentDescription="@string/a11y_public_room"
android:padding="2dp"
android:src="@drawable/ic_public_room"
android:visibility="gone"
app:layout_constraintCircle="@+id/roomProfileAvatarView"
app:layout_constraintCircleAngle="135"
app:layout_constraintCircleRadius="64dp"
tools:ignore="MissingConstraints"
tools:visibility="visible" />
<im.vector.app.core.ui.views.ShieldImageView
android:id="@+id/roomProfileDecorationImageView"
android:layout_width="30dp"