Merge pull request #4236 from vector-im/feature/adm/fixing-home-menu-options
Fixing developer sync options always displaying
This commit is contained in:
commit
2a47acc68a
|
@ -0,0 +1 @@
|
|||
Fixes the developer sync options being displayed in the home menu when developer mode is disabled
|
|
@ -108,9 +108,9 @@ class HomeDetailFragment @Inject constructor(
|
|||
|
||||
override fun onPrepareOptionsMenu(menu: Menu) {
|
||||
withState(viewModel) { state ->
|
||||
menu.iterator().forEach { it.isVisible = state.currentTab is HomeTab.RoomList }
|
||||
val isRoomList = state.currentTab is HomeTab.RoomList
|
||||
menu.findItem(R.id.menu_home_mark_all_as_read).isVisible = isRoomList && hasUnreadRooms
|
||||
}
|
||||
menu.findItem(R.id.menu_home_mark_all_as_read).isVisible = hasUnreadRooms
|
||||
super.onPrepareOptionsMenu(menu)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue