Make sure we're not landing on people's tab when using unified list

Fix bug after toggling notification tab visibility while in unified list
(which shouldn't be possible either way).

Change-Id: I61d90c3f6973b2629608a00d55332c034465851e
This commit is contained in:
SpiritCroc 2020-09-01 11:01:51 +02:00
parent e91be715a1
commit 0df61496f4
1 changed files with 5 additions and 1 deletions

View File

@ -152,7 +152,11 @@ class HomeDetailFragment @Inject constructor(
// As we hide it check if it's not the current item!
withState(viewModel) {
if (it.displayMode.toMenuId() == R.id.bottom_action_notification) {
viewModel.handle(HomeDetailAction.SwitchDisplayMode(RoomListDisplayMode.PEOPLE))
if (vectorPreferences.singleOverview()) {
viewModel.handle(HomeDetailAction.SwitchDisplayMode(RoomListDisplayMode.ALL))
} else {
viewModel.handle(HomeDetailAction.SwitchDisplayMode(RoomListDisplayMode.PEOPLE))
}
}
}
}