Display the room shield in all room setting screens

This commit is contained in:
Benoit Marty 2021-03-18 18:01:21 +01:00
parent 3078adf0da
commit 9f47598950
7 changed files with 15 additions and 1 deletions

View File

@ -5,7 +5,7 @@ Features ✨:
-
Improvements 🙌:
-
- Display the room shield in all room setting screens
Bugfix 🐛:
-

View File

@ -128,6 +128,7 @@ class RoomAliasFragment @Inject constructor(
state.roomSummary()?.let {
views.roomSettingsToolbarTitleView.text = it.displayName
avatarRenderer.render(it.toMatrixItem(), views.roomSettingsToolbarAvatarImageView)
views.roomSettingsDecorationToolbarAvatarImageView.render(it.roomEncryptionTrustLevel)
}
}

View File

@ -117,6 +117,7 @@ class RoomBannedMemberListFragment @Inject constructor(
state.roomSummary()?.let {
views.roomSettingsToolbarTitleView.text = it.displayName
avatarRenderer.render(it.toMatrixItem(), views.roomSettingsToolbarAvatarImageView)
views.roomSettingsDecorationToolbarAvatarImageView.render(it.roomEncryptionTrustLevel)
}
}
}

View File

@ -140,6 +140,7 @@ class RoomMemberListFragment @Inject constructor(
state.roomSummary()?.let {
views.roomSettingGeneric.roomSettingsToolbarTitleView.text = it.displayName
avatarRenderer.render(it.toMatrixItem(), views.roomSettingGeneric.roomSettingsToolbarAvatarImageView)
views.roomSettingGeneric.roomSettingsDecorationToolbarAvatarImageView.render(it.roomEncryptionTrustLevel)
}
}
}

View File

@ -91,6 +91,7 @@ class RoomPermissionsFragment @Inject constructor(
state.roomSummary()?.let {
views.roomSettingsToolbarTitleView.text = it.displayName
avatarRenderer.render(it.toMatrixItem(), views.roomSettingsToolbarAvatarImageView)
views.roomSettingsDecorationToolbarAvatarImageView.render(it.roomEncryptionTrustLevel)
}
}

View File

@ -154,6 +154,7 @@ class RoomSettingsFragment @Inject constructor(
state.roomSummary()?.let {
views.roomSettingsToolbarTitleView.text = it.displayName
avatarRenderer.render(it.toMatrixItem(), views.roomSettingsToolbarAvatarImageView)
views.roomSettingsDecorationToolbarAvatarImageView.render(it.roomEncryptionTrustLevel)
}
invalidateOptionsMenu()

View File

@ -34,6 +34,15 @@
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/avatars" />
<im.vector.app.core.ui.views.ShieldImageView
android:id="@+id/roomSettingsDecorationToolbarAvatarImageView"
android:layout_width="24dp"
android:layout_height="24dp"
app:layout_constraintCircle="@+id/roomSettingsToolbarAvatarImageView"
app:layout_constraintCircleAngle="135"
app:layout_constraintCircleRadius="20dp"
tools:ignore="MissingConstraints" />
<TextView
android:id="@+id/roomSettingsToolbarTitleView"
android:layout_width="0dp"