SelectedChannelMenu

fun SelectedChannelMenu(selectedChannel: Channel, isMuted: Boolean, currentUser: User?, onChannelOptionClick: (ChannelAction) -> Unit, onDismiss: () -> Unit, modifier: Modifier = Modifier, channelOptions: List<ChannelOptionState> = buildDefaultChannelOptionsState( selectedChannel = selectedChannel, isMuted = isMuted, ownCapabilities = selectedChannel.ownCapabilities, ), shape: Shape = ChatTheme.shapes.bottomSheet, overlayColor: Color = ChatTheme.colors.overlay, headerContent: @Composable ColumnScope.() -> Unit = { DefaultSelectedChannelMenuHeaderContent( selectedChannel = selectedChannel, currentUser = currentUser, ) }, centerContent: @Composable ColumnScope.() -> Unit = { DefaultSelectedChannelMenuCenterContent( onChannelOptionClick = onChannelOptionClick, channelOptions = channelOptions, ) })

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.

isMuted

If the channel is muted for the current user.

onChannelOptionClick

Handler for when the user selects a channel option.

onDismiss

Handler called when the dialog is dismissed.

modifier

Modifier for styling.

channelOptions

The list of options to show in the UI, according to user permissions.

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.