Add public room indicator to RoomDetailFragment & RoomProfileFragment
This commit is contained in:
parent
9ab59a543d
commit
e4c3457f37
|
@ -1433,6 +1433,7 @@ class RoomDetailFragment @Inject constructor(
|
||||||
renderSubTitle(typingMessage, roomSummary.topic)
|
renderSubTitle(typingMessage, roomSummary.topic)
|
||||||
views.roomToolbarDecorationImageView.render(roomSummary.roomEncryptionTrustLevel)
|
views.roomToolbarDecorationImageView.render(roomSummary.roomEncryptionTrustLevel)
|
||||||
views.roomToolbarPresenceImageView.render(roomSummary.isDirect, roomSummary.directUserPresence)
|
views.roomToolbarPresenceImageView.render(roomSummary.isDirect, roomSummary.directUserPresence)
|
||||||
|
views.roomToolbarPublicImageView.isVisible = roomSummary.isPublic && !roomSummary.isDirect
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -220,6 +220,7 @@ class RoomProfileFragment @Inject constructor(
|
||||||
headerViews.roomProfileDecorationImageView.render(it.roomEncryptionTrustLevel)
|
headerViews.roomProfileDecorationImageView.render(it.roomEncryptionTrustLevel)
|
||||||
views.matrixProfileDecorationToolbarAvatarImageView.render(it.roomEncryptionTrustLevel)
|
views.matrixProfileDecorationToolbarAvatarImageView.render(it.roomEncryptionTrustLevel)
|
||||||
headerViews.roomProfilePresenceImageView.render(it.isDirect, it.directUserPresence)
|
headerViews.roomProfilePresenceImageView.render(it.isDirect, it.directUserPresence)
|
||||||
|
headerViews.roomProfilePublicImageView.isVisible = it.isPublic && !it.isDirect
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
roomProfileController.setData(state)
|
roomProfileController.setData(state)
|
||||||
|
|
|
@ -53,7 +53,6 @@
|
||||||
app:layout_constraintStart_toEndOf="@+id/roomToolbarAvatarImageView"
|
app:layout_constraintStart_toEndOf="@+id/roomToolbarAvatarImageView"
|
||||||
app:layout_constraintTop_toTopOf="@+id/roomToolbarTitleView" />
|
app:layout_constraintTop_toTopOf="@+id/roomToolbarTitleView" />
|
||||||
|
|
||||||
|
|
||||||
<im.vector.app.core.ui.views.PresenceStateImageView
|
<im.vector.app.core.ui.views.PresenceStateImageView
|
||||||
android:id="@+id/roomToolbarPresenceImageView"
|
android:id="@+id/roomToolbarPresenceImageView"
|
||||||
android:layout_width="12dp"
|
android:layout_width="12dp"
|
||||||
|
@ -68,6 +67,21 @@
|
||||||
tools:src="@drawable/ic_presence_offline"
|
tools:src="@drawable/ic_presence_offline"
|
||||||
tools:visibility="visible" />
|
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
|
<TextView
|
||||||
android:id="@+id/roomToolbarTitleView"
|
android:id="@+id/roomToolbarTitleView"
|
||||||
style="@style/Widget.Vector.TextView.HeadlineMedium"
|
style="@style/Widget.Vector.TextView.HeadlineMedium"
|
||||||
|
|
|
@ -35,6 +35,21 @@
|
||||||
tools:src="@drawable/ic_presence_offline"
|
tools:src="@drawable/ic_presence_offline"
|
||||||
tools:visibility="visible" />
|
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
|
<im.vector.app.core.ui.views.ShieldImageView
|
||||||
android:id="@+id/roomProfileDecorationImageView"
|
android:id="@+id/roomProfileDecorationImageView"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
|
|
Loading…
Reference in New Issue