Merge pull request #6795 from vector-im/feature/eric/toolbar-space-name

New App Layout: Space name reflected in toolbar
This commit is contained in:
Eric Decanini 2022-08-17 10:52:07 +02:00 committed by GitHub
commit b6bcefbb92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

1
changelog.d/6795.wip Normal file
View File

@ -0,0 +1 @@
Makes toolbar switch title based on space in New App Layout

View File

@ -268,8 +268,7 @@ class NewHomeDetailFragment @Inject constructor(
}
private fun onSpaceChange(spaceSummary: RoomSummary?) {
// Reimplement in next PR
println(spaceSummary)
views.collapsingToolbar.title = (spaceSummary?.displayName ?: getString(R.string.all_chats))
}
private fun setupKeysBackupBanner() {

View File

@ -49,6 +49,7 @@
app:layout_constraintTop_toBottomOf="@id/syncStateView">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
style="@style/Widget.Vector.Material3.CollapsingToolbar.Medium"
android:layout_width="match_parent"
android:layout_height="?attr/collapsingToolbarLayoutMediumSize"
@ -61,7 +62,7 @@
android:layout_height="?attr/actionBarSize"
android:elevation="0dp"
app:layout_collapseMode="pin"
app:title="@string/all_chats">
tools:title="@string/all_chats">
<ImageView
android:id="@+id/avatar"