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