MessageListViewModel
View model class for MessageListView. Responsible for updating the list of messages. Can be bound to the view using MessageListViewModel.bindView function.
Parameters
Controller used to relay the logic and fetch the state.
Constructors
Types
Properties
Holds information about the current channel and is actively updated.
Regulates the visibility of deleted messages.
Emits error events.
Emits the status of searching situation. True when inside a search and false otherwise.
Emits true if we should are loading more older messages.
Regulates the message footer visibility.
Whether the user is viewing a thread.
Holds information about the abilities the current user is able to exercise in the given channel.
Determines whether we should show system messages or not.
Current message list state.
The target message that the list should scroll to. Used when scrolling to a pinned message, a message opened from a push notification or similar.
Unread count of the channel or thread depending on MessageMode.
Emits the current unread label state.
Functions
Returns a message with the given ID from the messages list.
Handles an Event coming from the View layer.
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.
Sets whether the system messages should be visible.
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 a handler which determines the position of a message inside a group.
Sets thread date separator handler which determines when to add date separators inside the thread.
Inherited functions
Binds MessageListView with MessageListViewModel, updating the view's state based on data provided by the ViewModel, and forwarding View events to the ViewModel.