Feat: Show channel number and name in direct message title (#1131)

* Feat: Show channel number and name in direct message title

This commit updates the message title to include the channel number and name when viewing direct messages.

This improves the user experience by providing more context about the conversation.

* Refactor: Improve message fragment toolbar

Use MaterialToolbar's built-in title and subtitle features to display channel name and number, simplifying the layout and improving UI consistency.
This commit is contained in:
James Rich 2024-07-13 05:25:22 -05:00 committed by GitHub
parent 7a6ef224f5
commit 8dad5a085e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 48 additions and 28 deletions

View file

@ -10,28 +10,13 @@
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
style="@style/MyToolbar"
android:title="@string/channel_name"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_constraintHeight_min="?attr/actionBarSize"
android:layout_height="wrap_content"
android:background="@color/toolbarBackground"
app:layout_constraintTop_toTopOf="parent"
app:navigationIcon="?android:attr/homeAsUpIndicator">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/messageTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/channel_name"
android:textAppearance="@style/TextAppearance.Widget.AppCompat.Toolbar.Title"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.appbar.MaterialToolbar>
app:navigationIcon="?android:attr/homeAsUpIndicator"/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/messageListView"