Move manage rooms menu item to top of space menu
This commit is contained in:
parent
e5e4b18b80
commit
8dc7caa737
1 changed files with 13 additions and 11 deletions
|
|
@ -136,8 +136,8 @@ fun SpaceView(
|
|||
showManageRoomsAction = state.showManageRoomsAction,
|
||||
onBackClick = onBackClick,
|
||||
onLeaveSpaceClick = onLeaveSpaceClick,
|
||||
onShareSpace = onShareSpace,
|
||||
onSettingsClick = onSettingsClick,
|
||||
onShareSpace = onShareSpace,
|
||||
onViewMembersClick = onViewMembersClick,
|
||||
onManageRoomsClick = { state.eventSink(SpaceEvents.EnterManageMode) },
|
||||
)
|
||||
|
|
@ -379,6 +379,17 @@ private fun SpaceViewTopBar(
|
|||
expanded = showMenu,
|
||||
onDismissRequest = { showMenu = false }
|
||||
) {
|
||||
if (showManageRoomsAction) {
|
||||
SpaceMenuItem(
|
||||
titleRes = CommonStrings.action_manage_rooms,
|
||||
icon = CompoundIcons.Edit(),
|
||||
onClick = {
|
||||
showMenu = false
|
||||
onManageRoomsClick()
|
||||
}
|
||||
)
|
||||
HorizontalDivider()
|
||||
}
|
||||
SpaceMenuItem(
|
||||
titleRes = R.string.screen_space_menu_action_members,
|
||||
icon = CompoundIcons.User(),
|
||||
|
|
@ -395,16 +406,6 @@ private fun SpaceViewTopBar(
|
|||
onShareSpace()
|
||||
}
|
||||
)
|
||||
if (showManageRoomsAction) {
|
||||
SpaceMenuItem(
|
||||
titleRes = CommonStrings.action_manage_rooms,
|
||||
icon = CompoundIcons.Edit(),
|
||||
onClick = {
|
||||
showMenu = false
|
||||
onManageRoomsClick()
|
||||
}
|
||||
)
|
||||
}
|
||||
if (canAccessSpaceSettings) {
|
||||
SpaceMenuItem(
|
||||
titleRes = CommonStrings.common_settings,
|
||||
|
|
@ -415,6 +416,7 @@ private fun SpaceViewTopBar(
|
|||
}
|
||||
)
|
||||
}
|
||||
HorizontalDivider()
|
||||
SpaceMenuItem(
|
||||
titleRes = CommonStrings.action_leave_space,
|
||||
icon = CompoundIcons.Leave(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue