MessageListController

constructor(cid: String, clipboardHandler: ClipboardHandler, threadLoadOrderOlderToNewer: Boolean, messageId: String? = null, parentMessageId: String? = null, messageLimit: Int = DEFAULT_MESSAGES_LIMIT, chatClient: ChatClient = ChatClient.instance(), clientState: ClientState = chatClient.clientState, channelState: StateFlow<ChannelState?>, deletedMessageVisibility: DeletedMessageVisibility = DeletedMessageVisibility.ALWAYS_VISIBLE, showSystemMessages: Boolean = true, messageFooterVisibility: MessageFooterVisibility = MessageFooterVisibility.WithTimeDifference(), enforceUniqueReactions: Boolean = true, dateSeparatorHandler: DateSeparatorHandler = DateSeparatorHandler.getDefaultDateSeparatorHandler(), threadDateSeparatorHandler: DateSeparatorHandler = DateSeparatorHandler.getDefaultThreadDateSeparatorHandler(), messagePositionHandler: MessagePositionHandler = MessagePositionHandler.defaultHandler(), showDateSeparatorInEmptyThread: Boolean = false, showThreadSeparatorInEmptyThread: Boolean = false)

Parameters

cid

The channel id in the format messaging:123.

clipboardHandler

ClipboardHandler used to copy messages.

threadLoadOrderOlderToNewer

Determines the order in which the thread messages are loaded.

messageId

The message id to which we want to scroll to when opening the message list.

parentMessageId

The ID of the parent Message if the message we want to scroll to is in a thread. If the message we want to scroll to is not in a thread, you can pass in a null value.

messageLimit

The limit of messages being fetched with each page od data.

chatClient

The client used to communicate with the API.

clientState

The current state of the SDK.

channelState

The state of the channel.

deletedMessageVisibility

The DeletedMessageVisibility to be applied to the list.

showSystemMessages

Determines if the system messages should be shown or not.

messageFooterVisibility

Determines if and when the message footer is visible or not.

enforceUniqueReactions

Determines whether the user can send only a single or multiple reactions to a message. If it is true the new reaction will override the old reaction.

dateSeparatorHandler

Determines the visibility of date separators inside the message list.

threadDateSeparatorHandler

Determines the visibility of date separators inside the thread.

messagePositionHandler

Determines the position of the message inside a group.

showDateSeparatorInEmptyThread

Configures if we show a date separator when threads are empty. Adds the separator item when the value is true.

showThreadSeparatorInEmptyThread

Configures if we show a thread separator when threads are empty or not. Adds the separator item when the value is true.