Channel View Model
ViewModel preparing and managing data related with the list of messages in a channel since 3.0.0
Constructors
Link copied to clipboard
open fun ChannelViewModel(@NonNull channelUrl: String, @Nullable messageListParams: MessageListParams)
Constructor
Types
Functions
Link copied to clipboard
Processes a list of messages to be passed to the view.
Link copied to clipboard
Creates params for the message list when loading the message list.
Link copied to clipboard
Deletes a message.
Link copied to clipboard
Returns LiveData that can be observed if huge gaps are detected within the collection this view model managed.
Link copied to clipboard
Retrieves message that matches
messageId
from the message list which this view model manages.Link copied to clipboard
Returns LiveData that can be observed for the state of loading messages.
Link copied to clipboard
Retrieves messages created at
createdAt
from the message list which this view model manages.Link copied to clipboard
Returns the timestamp that is the starting point when the message list is fetched initially.
Link copied to clipboard
Returns LiveData that can be observed for the status of the result of fetching the message list.
Link copied to clipboard
Returns LiveData that can be observed for members who are typing in the channel associated with this view model.
Link copied to clipboard
Checks if the message with
messageId
is in the message list which this view model manages.Link copied to clipboard
Determine whether the data on the previous page exists.
Link copied to clipboard
Requests the list of
BaseMessage
s for the first time.Link copied to clipboard
Requests the list of
BaseMessage
s when the page goes to the next.Link copied to clipboard
Requests the list of
BaseMessage
s when the page goes to the previous.Link copied to clipboard
Returns LiveData that can be observed if the channel has been deleted.
Link copied to clipboard
Returns LiveData that can be observed if the channel has been updated.
Link copied to clipboard
Returns LiveData that can be observed for the result of deleting feedback.
Link copied to clipboard
Returns LiveData that can be observed for the result of submitting feedback.
Link copied to clipboard
Returns LiveData that can be observed for the result of updating feedback.
Link copied to clipboard
Returns LiveData that can be observed if the messages has been deleted in the collection this view model managed.
Link copied to clipboard
Removes feedback for the message.
Link copied to clipboard
Registers a handler for the message collection managed by this view model.
Link copied to clipboard
open fun submitFeedback(@NonNull message: BaseMessage, @NonNull rating: FeedbackRating, @Nullable comment: String)
Submits feedback for the message.