Package-level declarations

Types

Link copied to clipboard
typealias AnnotatedMessageTextBuilder = AnnotatedString.Builder.(message: Message, currentUser: User?) -> Unit

A builder for the annotated message text.

Link copied to clipboard
class DefaultReactionResolver(emojiMapping: Map<String, String?> = defaultEmojiMapping, val defaultReactions: List<String> = defaultQuickReactions) : ReactionResolver

Default implementation of ReactionResolver that provides emoji codes for based on the emoji mapping passed to the constructor.

Link copied to clipboard

An interface that allows to return the desired horizontal alignment for a particular MessageItemState.

Link copied to clipboard

An interface that allows to generate a preview text for the given message.

Link copied to clipboard

An interface that allows the creation of message preview icons for message types.

Link copied to clipboard
fun interface MessageTextFormatter

An interface that allows to format the message text.

Link copied to clipboard

Resolves reaction types to emoji codes and provides the list of available reactions.

Link copied to clipboard

An interface that allows to generate a title text for the given message.

Link copied to clipboard

A factory that creates new Coil ImageLoader instances.

A provider of CompositionLocal that returns the current ImageLoader for the composition.

Properties

Link copied to clipboard

A CompositionLocal that returns the current ImageLoader for the composition. If a local ImageLoader has not been provided, it returns the singleton instance of ImageLoader in Coil.

Functions

Link copied to clipboard
fun Channel.getLastMessage(currentUser: User?): Message?

Returns channel's last regular or system message if exists. Deleted and silent messages, as well as messages from shadow-banned users, are not taken into account.

Link copied to clipboard

Returns a string describing the elapsed time since the user was online (was watching the channel).

Link copied to clipboard
fun Channel.getMembersStatusText(context: Context, currentUser: User?): String

Returns a string describing the member status of the channel: either a member count for a group channel or the last seen text for a direct one-to-one conversation with the current user.

Link copied to clipboard
fun Channel.getOtherUsers(currentUser: User?): List<User>

Returns a list of users that are members of the channel excluding the currently logged in user.

Link copied to clipboard
fun Channel.getReadStatuses(userToIgnore: User?): List<Date>

Filters the read status of each person other than the target user.

Link copied to clipboard

Checks if the channel is distinct.

Link copied to clipboard
fun Channel.isOneToOne(currentUser: User?): Boolean

Checks if the channel is a direct conversation between the current user and some other user.

Link copied to clipboard
fun rememberMessageListState(initialFirstVisibleItemIndex: Int = 0, initialFirstVisibleItemScrollOffset: Int = 0, parentMessageId: String? = null, messageOffsetHandler: MessagesLazyListState.MessageOffsetHandler = MessagesLazyListState.defaultOffsetHandler): MessagesLazyListState

Provides a MessagesLazyListState that's tied to a given message list. This is the default behavior, where we keep the base scroll position of the list persisted at all times, while the thread scroll state is always new, whenever we enter a thread.

Link copied to clipboard
fun rememberMessagesLazyListState(initialFirstVisibleItemIndex: Int = 0, initialFirstVisibleItemScrollOffset: Int = 0, messageOffsetHandler: MessagesLazyListState.MessageOffsetHandler = MessagesLazyListState.defaultOffsetHandler): MessagesLazyListState

Creates a MessagesLazyListState that is remembered across compositions. Changes to the provided initial values will not result in the state being recreated or changed in any way if it has already been created.

Link copied to clipboard

Returns a State that indicates whether the original text of the message should be shown or not.