Package-level declarations

Functions

Link copied to clipboard
fun ThreadItem(thread: Thread, currentUser: User?, onThreadClick: (Thread) -> Unit, modifier: Modifier = Modifier, titleContent: @Composable (Channel) -> Unit = { channel -> DefaultThreadTitle(channel, currentUser) }, replyToContent: @Composable RowScope.(parentMessage: Message) -> Unit = { parentMessage -> DefaultReplyToContent(parentMessage) }, unreadCountContent: @Composable RowScope.(unreadCount: Int) -> Unit = { unreadCount -> DefaultUnreadCountContent(unreadCount) }, latestReplyContent: @Composable (reply: Message) -> Unit = { reply -> DefaultLatestReplyContent(reply) })

The basic Thread item, showing information about the Thread title, parent message, last reply and number of unread replies.

Link copied to clipboard
fun ThreadList(viewModel: ThreadListViewModel, modifier: Modifier = Modifier, currentUser: User? = ChatClient.instance().getCurrentUser(), onUnreadThreadsBannerClick: () -> Unit = { viewModel.load() }, onThreadClick: (Thread) -> Unit = {}, onLoadMore: () -> Unit = { viewModel.loadNextPage() }, unreadThreadsBanner: @Composable (Int) -> Unit = { DefaultUnreadThreadsBanner(it, onClick = onUnreadThreadsBannerClick) }, itemContent: @Composable (Thread) -> Unit = { DefaultThreadItem(it, currentUser, onThreadClick) }, emptyContent: @Composable () -> Unit = { DefaultThreadListEmptyContent(modifier) }, loadingContent: @Composable () -> Unit = { DefaultThreadListLoadingContent(modifier) }, loadingMoreContent: @Composable () -> Unit = { DefaultThreadListLoadingMoreContent() })
fun ThreadList(state: ThreadListState, modifier: Modifier = Modifier, currentUser: User? = ChatClient.instance().getCurrentUser(), onUnreadThreadsBannerClick: () -> Unit, onThreadClick: (Thread) -> Unit, onLoadMore: () -> Unit, unreadThreadsBanner: @Composable (Int) -> Unit = { DefaultUnreadThreadsBanner(it, onClick = onUnreadThreadsBannerClick) }, itemContent: @Composable (Thread) -> Unit = { DefaultThreadItem(it, currentUser, onThreadClick) }, emptyContent: @Composable () -> Unit = { DefaultThreadListEmptyContent(modifier) }, loadingContent: @Composable () -> Unit = { DefaultThreadListLoadingContent(modifier) }, loadingMoreContent: @Composable () -> Unit = { DefaultThreadListLoadingMoreContent() })

Composable rendering a paginated list of threads. Optionally, it renders a banner informing about new threads/thread messages outside of the loaded pages of threads.

Link copied to clipboard
fun UnreadThreadsBanner(unreadThreads: Int, modifier: Modifier = Modifier, onClick: () -> Unit? = null)

Composable a banner showing the number of unread threads. It will not be shown if unreadThreads is zero.