diff --git a/changelog.d/6795.wip b/changelog.d/6795.wip new file mode 100644 index 00000000000..da525a2c675 --- /dev/null +++ b/changelog.d/6795.wip @@ -0,0 +1 @@ +Makes toolbar switch title based on space in New App Layout diff --git a/vector/src/main/java/im/vector/app/features/home/NewHomeDetailFragment.kt b/vector/src/main/java/im/vector/app/features/home/NewHomeDetailFragment.kt index c2b61d694a8..839ae6da889 100644 --- a/vector/src/main/java/im/vector/app/features/home/NewHomeDetailFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/NewHomeDetailFragment.kt @@ -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() { diff --git a/vector/src/main/res/layout/fragment_new_home_detail.xml b/vector/src/main/res/layout/fragment_new_home_detail.xml index b0e7bf76346..8066ab1bd9c 100644 --- a/vector/src/main/res/layout/fragment_new_home_detail.xml +++ b/vector/src/main/res/layout/fragment_new_home_detail.xml @@ -49,6 +49,7 @@ app:layout_constraintTop_toBottomOf="@id/syncStateView"> + tools:title="@string/all_chats">