MessageListController
Controller responsible for handling message list state. It acts as a central place for core business logic and state required to show the message list, message thread and handling message actions.
Parameters
The channel id in the format messaging:123.
ClipboardHandler used to copy messages.
Determines the order in which the thread messages are loaded.
The message id to which we want to scroll to when opening the message list.
The ID of the parent message for which we want to initially load the thread. (Must be supplied if we want to scroll to a message inside a thread).
The limit of messages being fetched with each page od data.
The client used to communicate with the API.
The current state of the SDK.
The state of the channel.
The DeletedMessageVisibility to be applied to the list.
Determines if the system messages should be shown or not.
Determines if and when the message footer is visible or not.
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.
Determines the visibility of date separators inside the message list.
Determines the visibility of date separators inside the thread.
Determines the position of the message inside a group.
Configures if we show a date separator when threads are empty. Adds the separator item when the value is true
.
Configures if we show a thread separator when threads are empty or not. Adds the separator item when the value is true
.
Constructors
Types
A class designed for error event propagation.
Properties
Gives us information about the online state of the device.
Whether the user is inside search or not.
Gives us information if we're currently in the MessageMode.MessageThread mode.
Gives us information if the MessageListController was started for the purpose of showing a thread.
Current state of the message list depending on the MessageMode the list is in.
Holds information about the abilities the current user is able to exercise in the given channel.
The list of typing users.
Holds information about the unread label state.
Functions
Cast an answer for a poll in a message.
Clears the new messages state and drops the unread count to 0 after the user scrolls to the newest message.
Deletes the given message.
Disable the unread label button.
Dismisses all message actions, when we cancel them in the rest of the UI.
Used to dismiss a specific message action, such as delete, reply, edit or something similar.
Triggered when the user taps the show more options button on the poll message.
Leaves the thread we're in and switches to MessageMode.Normal.
Changes the current _mode to be MessageMode.MessageThread and uses ChatClient to get the ThreadState for the current thread.
Gets the message if it is inside the list.
Loads a given Message with a single page around it.
Loads newer messages of a channel following the currently newest loaded message. In case of threads this will do nothing.
Loads more messages if we have reached the oldest message currently loaded.
Marks that the last message in the list as read. This also sets the unread count to 0.
Marks the selected message as unread.
Open the thread for the given message. If the message is a thread start, it will open the thread. If the message is a reply, it will open the thread for the parent message.
Executes one of the actions for the given ephemeral giphy message.
Triggered when the user selects a new message action, in the message overlay.
Pins the message from the current channel.
Triggered when the user selects a reaction for the currently selected message. If the message already has that reaction, from the current user, we remove it. Otherwise we add a new reaction.
Removes a single Attachment from a Message.
Resets the MessagesStates, to remove the message overlay, by setting 'selectedMessageState' to null.
Removes the shadow ban for the given user inside this channel.
Remove a vote for a poll in a message.
Resends a failed message.
When the user clicks the scroll to bottom button we need to take the user to the bottom of the newest messages. If the messages are not loaded we need to load them first and then scroll to the bottom of the list.
Scrolls to the first unread message in the channel.
Scrolls to the selected message. If the message is not currently in the list it will first load a page with the message in the middle of it, add it to the list and then notify to scroll to the message.
Triggered when the user taps the show more reactions button.
Triggered when the user long taps on and selects a message.
Triggered when the user taps on and selects message reactions.
Sets the date separator handler which determines when to add date separators. By default, a date separator will be added if the difference between two messages' dates is greater than 4h.
Sets the value used to filter deleted messages.
Sets the value used to determine if message footer content is shown.
Sets the MessagePositionHandler that determines the message position inside a group.
Sets whether the system messages should be visible.
Sets the thread date separator handler which determines when to add date separators inside the thread.
Shadow bans the given user inside this channel.
Unblock a user.
Un-flags a user identified by the provided ID.
Unmutes the given user.
Unmutes the given user inside this channel.
Unpins the message from the current channel.
Updates the last seen message so we can determine the unread count and mark messages as read.
Pins or unpins the message from the current channel based on its state.
Updates the poll option for the given message and poll.
Triggered when the poll information has been changed and need to sync on the poll states.
Mutes or unmutes a user for the current user based on the users mute state.