PinnedMessageListController

class PinnedMessageListController(cid: String, channelClient: ChannelClient = ChatClient.instance().channel(cid))

Controller responsible for handling pinned message list state. It acts as a central place for business logic and state management required to show the pinned messages in a channel. The pinned messages are presented in a descending order based on Message.pinnedAt.

Parameters

cid

The full channel ID. Ex: "messaging:123".

channelClient

The ChannelClient (instantiated for the given cid).

Constructors

Link copied to clipboard
constructor(cid: String, channelClient: ChannelClient = ChatClient.instance().channel(cid))

Properties

Link copied to clipboard
val errorEvents: SharedFlow<Unit>
Link copied to clipboard

Functions

Link copied to clipboard
fun load()

Loads the initial list of pinned messages.

Link copied to clipboard
fun loadMore()

Loads more pinned messages when requested. If the end of the list has been reached, or loading is already in progress, the request will be ignored.