PinnedMessageListViewModel

ViewModel responsible for providing pinned messages in the channel. Pinned messages are provided in a descending order based on Message.pinnedAt. Can be bound to the view using PinnedMessageListViewModel.bindView function.

Parameters

cid

The full channel id. ie messaging:123.

Constructors

Link copied to clipboard
constructor(cid: String)

Types

Link copied to clipboard
data class State(val canLoadMore: Boolean, val results: List<Message>, val isLoading: Boolean, val nextDate: Date)

Represents the pinned messages state, used to render the required UI.

Properties

Link copied to clipboard

One shot error events when query fails.

Link copied to clipboard

The current pinned messages' state.

Functions

Link copied to clipboard
fun loadMore()

Loads more data when requested.

Inherited functions

Link copied to clipboard
Link copied to clipboard

Binds PinnedMessageListView with PinnedMessageListViewModel, updating the view's state based on data provided by the ViewModel and propagating view events to the ViewModel as needed.