OpenChannelListViewModel

ViewModel preparing and managing data related with the list of open channels since 3.2.0

Constructors

Link copied to clipboard
open fun OpenChannelListViewModel(@Nullable params: OpenChannelListQueryParams)
Constructor

Functions

Link copied to clipboard
Tries to connect Sendbird Server and retrieve a channel instance.
Link copied to clipboard
protected open fun createOpenChannelListQueryParams(): OpenChannelListQueryParams
Creates group channel list query.
Link copied to clipboard
open fun getChannelList(): LiveData<List<OpenChannel>>
Live data that can be observed for a list of channels.
Link copied to clipboard
Returns LiveData that can be observed if the Initial load has ended.
Link copied to clipboard
open fun hasNext(): Boolean
Determine whether the data on the next page exists.
Link copied to clipboard
open fun hasPrevious(): Boolean
Returns false as the channel list do not support to load for the previous by default.
Link copied to clipboard
open fun loadInitial()
Requests the list of OpenChannels for the first time.
Link copied to clipboard
open fun loadNext(): List<OpenChannel>
Requests the list of OpenChannels.
Link copied to clipboard
open fun loadPrevious(): List<OpenChannel>
Returns the empty list as the channel list do not support to load for the previous by default.
Link copied to clipboard
protected open fun onCleared()