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
typealias AnnotatedQuotedMessageTextBuilder = AnnotatedString.Builder.(message: Message, replyMessage: Message?, currentUser: User?) -> Unit

A builder for the annotated message text.

Link copied to clipboard

The default implementation of PollSwitchItemFactory that holds the default poll switch items.ø

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

An interface that allows the creation of poll switch items for the creation screen.

Link copied to clipboard

An interface that allows to format the quoted message text.

Link copied to clipboard
data class ReactionDrawable(@DrawableRes val iconResId: Int, @DrawableRes val selectedIconResId: Int)

Contains drawable resources for normal and selected reaction states.

Link copied to clipboard
data class ReactionIcon(val painter: Painter, val selectedPainter: Painter)

Contains Painters for normal and selected states of the reaction icon.

Link copied to clipboard

An interface that allows the creation of reaction icons for reaction types.

Link copied to clipboard

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

Link copied to clipboard
class StorageHelperWrapper(context: Context, storageHelper: StorageHelper, attachmentFilter: AttachmentFilter)

Wrapper around the StorageHelper class, with some extra functionality that makes it easier to decouple the business logic and make it consistent.

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 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
fun rememberStreamImagePainter(model: ImageRequest, placeholderPainter: Painter? = null, errorPainter: Painter? = null, fallbackPainter: Painter? = errorPainter, onLoading: (AsyncImagePainter.State.Loading) -> Unit? = null, onSuccess: (AsyncImagePainter.State.Success) -> Unit? = null, onError: (AsyncImagePainter.State.Error) -> Unit? = null, contentScale: ContentScale = ContentScale.Fit, filterQuality: FilterQuality = DrawScope.DefaultFilterQuality): AsyncImagePainter
fun rememberStreamImagePainter(data: Any?, placeholderPainter: Painter? = null, errorPainter: Painter? = null, fallbackPainter: Painter? = errorPainter, onLoading: (AsyncImagePainter.State.Loading) -> Unit? = null, onSuccess: (AsyncImagePainter.State.Success) -> Unit? = null, onError: (AsyncImagePainter.State.Error) -> Unit? = null, contentScale: ContentScale = ContentScale.Fit, filterQuality: FilterQuality = DrawScope.DefaultFilterQuality): AsyncImagePainter

Wrapper around the coil.compose.rememberAsyncImagePainter that plugs in our LocalStreamImageLoader singleton that can be used to customize all image loading requests, like adding headers, interceptors and similar.

Link copied to clipboard
fun StreamImage(imageRequest: () -> ImageRequest, modifier: Modifier = Modifier, component: ImageComponent = rememberImageComponent {}, imageOptions: ImageOptions = ImageOptions(), onImageStateChanged: (CoilImageState) -> Unit = {}, previewPlaceholder: Painter? = null, loading: @Composable BoxScope.(imageState: CoilImageState.Loading) -> Unit? = null, success: @Composable BoxScope.(imageState: CoilImageState.Success, painter: Painter) -> Unit? = null, failure: @Composable BoxScope.(imageState: CoilImageState.Failure) -> Unit? = null)
fun StreamImage(data: () -> Any?, modifier: Modifier = Modifier, component: ImageComponent = rememberImageComponent {}, requestListener: () -> ImageRequest.Listener? = null, imageOptions: ImageOptions = ImageOptions(), onImageStateChanged: (CoilImageState) -> Unit = {}, previewPlaceholder: Painter? = null, loading: @Composable BoxScope.(imageState: CoilImageState.Loading) -> Unit? = null, success: @Composable BoxScope.(imageState: CoilImageState.Success, painter: Painter) -> Unit? = null, failure: @Composable BoxScope.(imageState: CoilImageState.Failure) -> Unit? = null)

Wrapper around the CoilImage that plugs in our LocalStreamImageLoader singleton that can be used to customize all image loading requests, like adding headers, interceptors and similar.

Inherited 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

Applies the given mirroring scaleX based on the layoutDirection that's currently configured in the UI.