SelectedChannelMenu
fun SelectedChannelMenu(selectedChannel: Channel, currentUser: User?, channelActions: List<ChannelAction>, onChannelOptionConfirm: (ChannelAction) -> Unit, onDismiss: () -> Unit, modifier: Modifier = Modifier, shape: Shape = RoundedCornerShape(topStart = 16.dp, topEnd = 16.dp), overlayColor: Color = ChatTheme.colors.backgroundCoreScrim, headerContent: @Composable ColumnScope.() -> Unit = {
with(ChatTheme.componentFactory) {
ChannelMenuHeaderContent(
params = ChannelMenuHeaderContentParams(
selectedChannel = selectedChannel,
currentUser = currentUser,
),
)
}
}, centerContent: @Composable ColumnScope.() -> Unit = {
with(ChatTheme.componentFactory) {
ChannelMenuCenterContent(
params = ChannelMenuCenterContentParams(
onChannelOptionConfirm = onChannelOptionConfirm,
channelActions = channelActions,
),
)
}
})
Shows special UI when an item is selected. It also prepares the available options for the channel, based on if we're an admin or not.
Parameters
selectedChannel
The channel the user selected.
currentUser
The currently logged-in user data.
channelActions
The list of actions to show in the menu.
onChannelOptionConfirm
Handler for when the user selects a channel option. Routes through confirmation dialogs for destructive actions before executing.
onDismiss
Handler called when the dialog is dismissed.
modifier
Modifier for styling.
shape
The shape of the component.
overlayColor
The color applied to the overlay.
headerContent
The content shown at the top of the dialog.
centerContent
The content shown at the center of the dialog.