diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt index b66897d8d1..3c271710dd 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt @@ -40,6 +40,7 @@ import android.widget.TextView import android.widget.Toast import androidx.annotation.DrawableRes import androidx.annotation.StringRes +import androidx.appcompat.view.menu.MenuBuilder import androidx.core.content.ContextCompat import androidx.core.graphics.drawable.DrawableCompat import androidx.core.net.toUri @@ -982,7 +983,11 @@ class TimelineFragment @Inject constructor( } } + @SuppressLint("RestrictedApi") override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) { + if (isThreadTimeLine()) { + if (menu is MenuBuilder) menu.setOptionalIconsVisible(true) + } super.onCreateOptionsMenu(menu, inflater) // We use a custom layout for this menu item, so we need to set a ClickListener menu.findItem(R.id.open_matrix_apps)?.let { menuItem -> diff --git a/vector/src/main/res/menu/menu_timeline.xml b/vector/src/main/res/menu/menu_timeline.xml index d035ce38eb..e362ec7483 100644 --- a/vector/src/main/res/menu/menu_timeline.xml +++ b/vector/src/main/res/menu/menu_timeline.xml @@ -41,12 +41,13 @@ android:id="@+id/menu_timeline_thread_list" android:title="@string/action_view_threads" android:visible="false" - app:iconTint="?colorPrimary" app:actionLayout="@layout/view_thread_notification_badge" + app:iconTint="?colorPrimary" app:showAsAction="always" tools:visible="true" /> - @@ -70,20 +71,19 @@ android:icon="@drawable/ic_thread_view_in_room_menu_item" android:title="@string/action_thread_view_in_room" app:iconTint="?vctr_content_secondary" - app:showAsAction="never" /> + app:showAsAction="withText" /> + app:showAsAction="withText" /> - + app:showAsAction="withText" /> \ No newline at end of file