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
The available message options within the menu.
Set of capabilities the user is given for the current channel. For a full list @see ChannelCapabilities.
Handler that propagates click events on each item.
onShowMoreReactionsSelected
Handler that propagates clicks on the show more reactions button.
The color applied to the overlay.
The available reactions within the menu.
Drawable resource used for the show more button.
Handler called when the menu is dismissed.