Package-level declarations

Functions

Link copied to clipboard

Determines the background color of the message bubble based on the message content and ownership.

Link copied to clipboard
fun GiphyMessageContent(message: Message, currentUser: User?, modifier: Modifier = Modifier, onGiphyActionClick: (GiphyAction) -> Unit = {})

Represents the content of an ephemeral giphy message.

Link copied to clipboard
fun MessageBubble(color: Color, shape: Shape, modifier: Modifier = Modifier, border: BorderStroke? = BorderStroke(1.dp, ChatTheme.colors.borders), contentPadding: PaddingValues = PaddingValues(), content: @Composable () -> Unit)

Wraps the content of a message in a bubble.

Link copied to clipboard
fun MessageContent(message: Message, currentUser: User?, modifier: Modifier = Modifier, onLongItemClick: (Message) -> Unit = {}, onGiphyActionClick: (GiphyAction) -> Unit = {}, onQuotedMessageClick: (Message) -> Unit = {}, onUserMentionClick: (User) -> Unit = {}, onLinkClick: (Message, String) -> Unit? = null, messageContentFactory: MessageContentFactory = ChatTheme.messageContentFactory, onMediaGalleryPreviewResult: (MediaGalleryPreviewResult?) -> Unit = {}, giphyEphemeralContent: @Composable () -> Unit = { if (messageContentFactory == MessageContentFactory.Deprecated) { ChatTheme.componentFactory.MessageGiphyContent( message = message, currentUser = currentUser, onGiphyActionClick = onGiphyActionClick, ) } else { messageContentFactory.MessageGiphyContent( message = message, currentUser = currentUser, onGiphyActionClick = onGiphyActionClick, ) } }, deletedMessageContent: @Composable () -> Unit = { if (messageContentFactory == MessageContentFactory.Deprecated) { ChatTheme.componentFactory.MessageDeletedContent( modifier = modifier, ) } else { messageContentFactory.MessageDeletedContent( modifier = modifier, ) } }, regularMessageContent: @Composable () -> Unit = { if (messageContentFactory == MessageContentFactory.Deprecated) { ChatTheme.componentFactory.MessageRegularContent( message = message, currentUser = currentUser, onLongItemClick = onLongItemClick, onMediaGalleryPreviewResult = onMediaGalleryPreviewResult, onQuotedMessageClick = onQuotedMessageClick, onLinkClick = onLinkClick, onUserMentionClick = onUserMentionClick, ) } else { DefaultMessageContent( message = message, currentUser = currentUser, onLongItemClick = onLongItemClick, messageContentFactory = messageContentFactory, onMediaGalleryPreviewResult = onMediaGalleryPreviewResult, onQuotedMessageClick = onQuotedMessageClick, onLinkClick = onLinkClick, onUserMentionClick = onUserMentionClick, ) } })

Represents the default message content within the bubble that can show different UI based on the message state.

Link copied to clipboard
fun MessageFooter(messageItem: MessageItemState, onToggleOriginalText: () -> Unit = {})

Default message footer, which contains either MessageThreadFooter or the default footer, which holds the sender name and the timestamp.

Link copied to clipboard
fun MessageHeaderLabel(painter: Painter, modifier: Modifier = Modifier, text: String? = null, contentPadding: PaddingValues = PaddingValues(vertical = 2.dp, horizontal = 4.dp))

Represents a meta information about the message that is shown above the message bubble.

Link copied to clipboard

Represents a small message reaction item.

Link copied to clipboard
fun MessageReactions(options: List<ReactionOptionItemState>, modifier: Modifier = Modifier, itemContent: @Composable RowScope.(ReactionOptionItemState) -> Unit = { option -> MessageReactionItem( modifier = Modifier .size(20.dp) .padding(2.dp) .align(Alignment.CenterVertically) .testTag("Stream_MessageReaction_${option.type}"), option = option, ) })

Represents a reaction bubble with a list of reactions this message has.

Link copied to clipboard
fun MessageText(message: Message, currentUser: User?, modifier: Modifier = Modifier, onLongItemClick: (Message) -> Unit, onLinkClick: (Message, String) -> Unit? = null, onUserMentionClick: (User) -> Unit = {})

Default text element for messages, with extra styling and padding for the chat bubble.

Link copied to clipboard
fun MessageThreadFooter(participants: List<User>, text: String, messageAlignment: MessageAlignment, modifier: Modifier = Modifier)

Shows a row of participants in the message thread, if they exist.

Link copied to clipboard
fun MessageTranslatedLabel(messageItem: MessageItemState, onToggleOriginalText: () -> Unit = {})

A composable function that displays a label indicating that a message has been translated.

Link copied to clipboard
fun OwnedMessageVisibilityContent(message: Message, modifier: Modifier = Modifier)

Shows the content that lets the user know that only they can see the message.

Link copied to clipboard
fun PollMessageContent(modifier: Modifier, messageItem: MessageItemState, onCastVote: (Message, Poll, Option) -> Unit, onRemoveVote: (Message, Poll, Vote) -> Unit, selectPoll: (Message, Poll, PollSelectionType) -> Unit, onAddAnswer: (message: Message, poll: Poll, answer: String) -> Unit, onClosePoll: (String) -> Unit, onAddPollOption: (poll: Poll, option: String) -> Unit, onLongItemClick: (Message) -> Unit = {})

Message content for the poll, which distinguishes the owner and users and allows them to interact.

Link copied to clipboard
fun QuotedMessage(message: Message, currentUser: User?, onLongItemClick: (Message) -> Unit, onQuotedMessageClick: (Message) -> Unit, modifier: Modifier = Modifier, replyMessage: Message? = null, leadingContent: @Composable (Message) -> Unit = { DefaultQuotedMessageLeadingContent( message = it, currentUser = currentUser, ) }, centerContent: @Composable RowScope.(Message) -> Unit = { DefaultQuotedMessageCenterContent( message = it, replyMessage = replyMessage, currentUser = currentUser, ) }, trailingContent: @Composable (Message) -> Unit = { DefaultQuotedMessageTrailingContent( message = it, currentUser = currentUser, ) })

Wraps the quoted message into a component that shows only the sender avatar, text and single attachment preview.

Link copied to clipboard
fun QuotedMessageContent(message: Message, currentUser: User?, modifier: Modifier = Modifier, replyMessage: Message? = null, attachmentContent: @Composable (Message) -> Unit = { DefaultQuotedMessageAttachmentContent( message = it, currentUser = currentUser, ) }, textContent: @Composable (Message) -> Unit = { DefaultQuotedMessageTextContent( message = it, replyMessage = replyMessage, currentUser = currentUser, ) })

Represents the default quoted message content that shows an attachment preview, if available, and the message text.

Link copied to clipboard
fun QuotedMessageText(message: Message, currentUser: User?, modifier: Modifier = Modifier, replyMessage: Message? = null, quoteMaxLines: Int = DefaultQuoteMaxLines)

Default text element for quoted messages, with extra styling and padding for the chat bubble.

Link copied to clipboard
fun ThreadParticipants(participants: List<User>, alignment: MessageAlignment, modifier: Modifier = Modifier, borderStroke: BorderStroke = BorderStroke(width = 1.dp, color = ChatTheme.colors.appBackground), participantsLimit: Int = DefaultParticipantsLimit)

Represents a number of participants in the thread.

Link copied to clipboard
fun UploadingFooter(message: Message, modifier: Modifier = Modifier)

A footer indicating the current upload progress - how many items have been uploaded and what the total number of items is.

Inherited functions

Link copied to clipboard
fun RowScope.DefaultQuotedMessageCenterContent(message: Message, currentUser: User?, replyMessage: Message? = null)

Represents the default content shown in the center of the quoted message wrapped inside a message bubble.