Package-level declarations

Types

Link copied to clipboard
sealed class MessageMenuAction

Actions available in the message selection mode's top bar.

Link copied to clipboard

Which translation action row the message actions sheet shows, if any (null = row hidden).

Properties

Link copied to clipboard

The maximum byte size for a message.

Functions

Link copied to clipboard
fun ActionModeTopBar(selectedCount: Int, onAction: (MessageMenuAction) -> Unit)

The top app bar displayed when in message selection mode.

Link copied to clipboard
fun DeleteMessageDialog(count: Int, onConfirm: () -> Unit, onDismiss: () -> Unit)

A dialog confirming the deletion of messages.

Link copied to clipboard
fun String.ellipsize(maxLength: Int): String

Ellipsizes a string if its length exceeds maxLength.

Link copied to clipboard
fun getMessageBubbleShape(cornerRadius: Dp, isSender: Boolean, hasSamePrev: Boolean = false, hasSameNext: Boolean = false): CornerBasedShape

Returns a CornerBasedShape for a message bubble based on its position in a sequence.

Link copied to clipboard
fun handleQuickChatAction(action: QuickChatAction, currentText: String, onUpdateText: (String) -> Unit, onSendMessage: (String) -> Unit)

Handles a quick chat action, either appending its message to the current text or sending it directly.

Link copied to clipboard
fun String.limitBytes(maxBytes: Int): String

Truncates a string to ensure its UTF-8 byte representation does not exceed maxBytes.

Link copied to clipboard
fun MessageActionsContent(quickEmojis: List<String>, onReply: () -> Unit, onReact: (String) -> Unit, onMoreReactions: () -> Unit, onCopy: () -> Unit, onSelect: () -> Unit, onDelete: () -> Unit, onStatus: () -> Unit, statusString: Pair<StringResource, StringResource>? = null, status: MessageStatus? = null, xeddsaSigned: Boolean = false, translationRowState: TranslationRowState? = null, onTranslate: () -> Unit = {}, onToggleTranslation: () -> Unit = {})
Link copied to clipboard
fun MessageItem(modifier: Modifier = Modifier, node: Node, ourNode: Node, message: Message, selected: Boolean, inSelectionMode: Boolean = false, onReply: () -> Unit = {}, sendReaction: (String) -> Unit = {}, onShowReactions: () -> Unit = {}, showUserName: Boolean = true, emojis: List<Reaction> = emptyList(), quickEmojis: List<String> = listOf("👍", "👎", "😂", "🔥", "❤️", "😮"), onClick: () -> Unit = {}, onLongClick: () -> Unit = {}, onDoubleClick: () -> Unit = {}, onSelect: () -> Unit = {}, onDelete: () -> Unit = {}, onClickChip: (Node) -> Unit = {}, resolveMention: (String) -> Node? = { null }, onNavigateToOriginalMessage: (Int) -> Unit = {}, onStatusClick: () -> Unit = {}, hasSamePrev: Boolean = false, hasSameNext: Boolean = false, searchQuery: String = "", translationAvailable: Boolean = false, isDirectMessage: Boolean = false, onTranslate: () -> Unit = {}, onToggleTranslation: () -> Unit = {})
Link copied to clipboard
fun MessageSearchBar(query: String, onQueryChange: (String) -> Unit, onClose: () -> Unit, resultCount: Int, currentIndex: Int = 0, onPrevious: () -> Unit = {}, onNext: () -> Unit = {}, modifier: Modifier = Modifier)

M3 contextual search bar that replaces the standard MessageTopBar when search is active. Follows the M3 "find in page" pattern: back arrow + text field + "X of Y" counter + prev/next arrows + clear.

Link copied to clipboard
fun MessageStatusDialog(message: Message, resendOption: Boolean, onResend: () -> Unit, onDismiss: () -> Unit, isDirectMessage: Boolean = false)
Link copied to clipboard
fun MessageStatusIcon(status: MessageStatus, modifier: Modifier = Modifier, tint: Color = Color.Unspecified, includeContentDescription: Boolean = true)
Link copied to clipboard
fun MessageTopBar(title: String, channelIndex: Int?, mismatchKey: Boolean, onNavigateBack: () -> Unit, channels: ChannelSet?, channelIndexParam: Int?, showQuickChat: Boolean, onToggleQuickChat: () -> Unit, onNavigateToQuickChatOptions: () -> Unit = {}, filteringDisabled: Boolean = false, onToggleFilteringDisabled: () -> Unit = {}, filteredCount: Int = 0, showFiltered: Boolean = false, onToggleShowFiltered: () -> Unit = {}, onNavigateToFilterSettings: () -> Unit = {}, onSearchClick: () -> Unit = {})

The default top app bar for the message screen.

Link copied to clipboard
fun QuickChatRow(modifier: Modifier = Modifier, enabled: Boolean, actions: List<QuickChatAction>, onClick: (QuickChatAction) -> Unit)

A row of quick chat action buttons.

Link copied to clipboard
Link copied to clipboard
fun ReplySnippet(originalMessage: Message?, onClearReply: () -> Unit, ourNode: Node?)

Displays a snippet of the message being replied to.

Link copied to clipboard
fun BoxScope.ScrollToBottomFab(coroutineScope: CoroutineScope, listState: LazyListState, unreadCount: Int)

A FloatingActionButton that scrolls the message list to the bottom (most recent messages).

Link copied to clipboard
fun UnreadMessagesDivider(modifier: Modifier = Modifier)