From 9505d196e4d0f191b229042d92b55bc780f21174 Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Wed, 10 Aug 2022 08:10:33 +0200 Subject: [PATCH 1/2] Changes space title in toolbar --- .../java/im/vector/app/features/home/NewHomeDetailFragment.kt | 3 +-- vector/src/main/res/layout/fragment_new_home_detail.xml | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) 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 bfdf385356..4766cd5006 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 @@ -270,8 +270,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 b0e7bf7634..8066ab1bd9 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"> Date: Wed, 10 Aug 2022 11:30:15 +0200 Subject: [PATCH 2/2] Adds changelog file --- changelog.d/6795.wip | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/6795.wip diff --git a/changelog.d/6795.wip b/changelog.d/6795.wip new file mode 100644 index 0000000000..da525a2c67 --- /dev/null +++ b/changelog.d/6795.wip @@ -0,0 +1 @@ +Makes toolbar switch title based on space in New App Layout