Skip to content

Commit

Permalink
Merge pull request #6795 from vector-im/feature/eric/toolbar-space-name
Browse files Browse the repository at this point in the history
New App Layout: Space name reflected in toolbar
  • Loading branch information
ericdecanini authored Aug 17, 2022
2 parents 4fedafc + 527bcf2 commit b6bcefb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.d/6795.wip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Makes toolbar switch title based on space in New App Layout
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/fragment_new_home_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit b6bcefb

Please sign in to comment.