SelectedMessageMenu

fun SelectedMessageMenu(message: Message, messageOptions: List<MessageOptionItemState>, ownCapabilities: Set<String>, onMessageAction: (MessageAction) -> Unit, onShowMoreReactionsSelected: () -> Unit, modifier: Modifier = Modifier, shape: Shape = ChatTheme.shapes.bottomSheet, overlayColor: Color = ChatTheme.colors.overlay, reactionTypes: Map<String, ReactionIcon> = ChatTheme.reactionIconFactory.createReactionIcons(), @DrawableRes showMoreReactionsIcon: Int = R.drawable.stream_compose_ic_more, onDismiss: () -> Unit = {}, headerContent: @Composable ColumnScope.() -> Unit = { val canLeaveReaction = ownCapabilities.contains(ChannelCapabilities.SEND_REACTION) if (ChatTheme.reactionOptionsTheme.areReactionOptionsVisible && canLeaveReaction) { DefaultSelectedMessageReactionOptions( message = message, reactionTypes = reactionTypes, showMoreReactionsDrawableRes = showMoreReactionsIcon, onMessageAction = onMessageAction, showMoreReactionsIcon = onShowMoreReactionsSelected, ) } }, centerContent: @Composable ColumnScope.() -> Unit = { DefaultSelectedMessageOptions( messageOptions = messageOptions, onMessageAction = onMessageAction, ) })

Represents the options user can take after selecting a message.

Parameters

message

The selected message.

messageOptions

The available message options within the menu.

ownCapabilities

Set of capabilities the user is given for the current channel. For a full list @see ChannelCapabilities.

onMessageAction

Handler that propagates click events on each item.

onShowMoreReactionsSelected

Handler that propagates clicks on the show more reactions button.

modifier

Modifier for styling.

shape

Changes the shape of SelectedMessageMenu.

overlayColor

The color applied to the overlay.

reactionTypes

The available reactions within the menu.

showMoreReactionsIcon

Drawable resource used for the show more button.

onDismiss

Handler called when the menu is dismissed.

headerContent

The content shown at the top of the SelectedMessageMenu dialog. By default ReactionOptions.

centerContent

The content shown at the center of the SelectedMessageMenu dialog. By Default MessageOptions.