Package-level declarations
Functions
Link copied to clipboard
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 = {
with(ChatTheme.componentFactory) {
val canLeaveReaction = ownCapabilities.contains(ChannelCapabilities.SEND_REACTION)
if (ChatTheme.reactionOptionsTheme.areReactionOptionsVisible && canLeaveReaction) {
MessageMenuHeaderContent(
modifier = Modifier,
message = message,
messageOptions = messageOptions,
onMessageAction = onMessageAction,
ownCapabilities = ownCapabilities,
onShowMore = onShowMoreReactionsSelected,
reactionTypes = reactionTypes,
showMoreReactionsIcon = showMoreReactionsIcon,
)
}
}
}, centerContent: @Composable ColumnScope.() -> Unit = {
with(ChatTheme.componentFactory) {
MessageMenuOptions(Modifier, message, messageOptions, { onMessageAction(it.action) })
}
})
Represents the options user can take after selecting a message.
Link copied to clipboard
fun SelectedReactionsMenu( message: Message, currentUser: User?, 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 (canLeaveReaction) {
with(ChatTheme.componentFactory) {
ReactionsMenuHeaderContent(
modifier = Modifier,
message = message,
reactionTypes = reactionTypes,
onMessageAction = onMessageAction,
onShowMoreReactionsSelected = onShowMoreReactionsSelected,
showMoreReactionsIcon = showMoreReactionsIcon,
)
}
}
}, centerContent: @Composable ColumnScope.() -> Unit = {
with(ChatTheme.componentFactory) {
ReactionsMenuCenterContent(
modifier = Modifier,
userReactions = buildUserReactionItems(
message = message,
currentUser = currentUser,
),
)
}
})
Represents the list of user reactions.