Class PinnedMessageListViewModel
-
- All Implemented Interfaces:
public final class PinnedMessageListViewModel extends ViewModel
ViewModel responsible for providing pinned messages in the channel. Pinned messages are provided in a descending order based on Message.pinnedAt. Can be bound to the view using PinnedMessageListViewModel.bindView function.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classPinnedMessageListViewModel.StateRepresents the pinned messages state, used to render the required UI.
-
Field Summary
Fields Modifier and Type Field Description private final LiveData<PinnedMessageListViewModel.State>stateprivate final LiveData<Event<Unit>>errorEvents
-
Constructor Summary
Constructors Constructor Description PinnedMessageListViewModel(String cid)
-
Method Summary
Modifier and Type Method Description final LiveData<PinnedMessageListViewModel.State>getState()The current pinned messages' state. final LiveData<Event<Unit>>getErrorEvents()One shot error events when query fails. final UnitloadMore()Loads more data when requested. -
-
Constructor Detail
-
PinnedMessageListViewModel
PinnedMessageListViewModel(String cid)
- Parameters:
cid- The full channel id.
-
-
Method Detail
-
getState
final LiveData<PinnedMessageListViewModel.State> getState()
The current pinned messages' state.
-
getErrorEvents
final LiveData<Event<Unit>> getErrorEvents()
One shot error events when query fails.
-
-
-
-