MessageListHeaderViewModel

class MessageListHeaderViewModel(cid: String, chatClient: ChatClient = ChatClient.instance(), clientState: ClientState = chatClient.clientState, messageId: String? = null) : ViewModel

ViewModel class for MessageListHeaderView.

Parameters

cid

The CID of the current channel.

chatClient

An instance of the low level chat client.

clientState

Client state of SDK that contains information such as the current user and connection state. such as the current user, connection state...

messageId

The id of a message we wish to scroll to in messages list. Used to control the number of channel queries executed on screen initialization.

Constructors

Link copied to clipboard
constructor(cid: String, chatClient: ChatClient = ChatClient.instance(), clientState: ClientState = chatClient.clientState, messageId: String? = null)

Properties

Link copied to clipboard

Signals that we are currently in thread mode if the value is non-null. If the value is null we are in normal mode.

Link copied to clipboard

The current Channel created from ChannelState. It emits new data either when channel data or the list of members in ChannelState updates.

Link copied to clipboard

A list of Channel members.

Link copied to clipboard

Number of Channel members.

Link copied to clipboard

Current user's online status.

Link copied to clipboard

A list of users who are currently typing.

Functions

Link copied to clipboard

Switches to normal (non-thread) mode.

Link copied to clipboard
fun setActiveThread(message: Message)

Sets thread mode.

Inherited functions

Link copied to clipboard
open fun addCloseable(closeable: AutoCloseable)
fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard

Binds MessageListHeaderView with MessageListHeaderViewModel, updating the view's state based on data provided by the ViewModel.

Link copied to clipboard