mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-18 04:08:44 +03:00
only updating the visibility of the menu option the home details fragment adds instead of changing all the parent options
- fixes the debug sync options being forced to visible
This commit is contained in:
parent
4f51dbdcf9
commit
64dce0638f
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue