From 8e12f71535835ed094c80861ab09367ec5a1c17f Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 17 Jul 2019 12:16:10 +0200 Subject: [PATCH] Add top left back button --- .../home/room/filtered/FilteredRoomsActivity.kt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/vector/src/main/java/im/vector/riotx/features/home/room/filtered/FilteredRoomsActivity.kt b/vector/src/main/java/im/vector/riotx/features/home/room/filtered/FilteredRoomsActivity.kt index 986d04b30f..98fd3fa2c2 100644 --- a/vector/src/main/java/im/vector/riotx/features/home/room/filtered/FilteredRoomsActivity.kt +++ b/vector/src/main/java/im/vector/riotx/features/home/room/filtered/FilteredRoomsActivity.kt @@ -20,17 +20,15 @@ import android.content.Context import android.content.Intent import android.os.Bundle import androidx.appcompat.widget.SearchView -import androidx.appcompat.widget.Toolbar import im.vector.riotx.R import im.vector.riotx.core.di.ScreenComponent import im.vector.riotx.core.extensions.replaceFragment -import im.vector.riotx.core.platform.ToolbarConfigurable import im.vector.riotx.core.platform.VectorBaseActivity import im.vector.riotx.features.home.room.list.RoomListFragment import im.vector.riotx.features.home.room.list.RoomListParams import kotlinx.android.synthetic.main.activity_filtered_rooms.* -class FilteredRoomsActivity : VectorBaseActivity(), ToolbarConfigurable { +class FilteredRoomsActivity : VectorBaseActivity() { private lateinit var roomListFragment: RoomListFragment @@ -44,6 +42,9 @@ class FilteredRoomsActivity : VectorBaseActivity(), ToolbarConfigurable { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + + configureToolbar(filteredRoomsToolbar) + if (isFirstCreation()) { roomListFragment = RoomListFragment.newInstance(RoomListParams(RoomListFragment.DisplayMode.FILTERED)) replaceFragment(roomListFragment, R.id.filteredRoomsFragmentContainer, FRAGMENT_TAG) @@ -67,10 +68,6 @@ class FilteredRoomsActivity : VectorBaseActivity(), ToolbarConfigurable { filteredRoomsSearchView.requestFocus() } - override fun configure(toolbar: Toolbar) { - configureToolbar(toolbar) - } - companion object { private const val FRAGMENT_TAG = "RoomListFragment"