Package ai.nexconn.chatui.channellist
Class ChannelListViewModel
-
- All Implemented Interfaces:
public class ChannelListViewModel extends BaseViewModel
Channel list ViewModel
Coordinates all Handlers, manages LiveData, and exposes data to Fragment.
- Since:
5.10.4
-
-
Field Summary
Fields Modifier and Type Field Description protected final ChannelListDataHandlerdataHandlerprotected final MutableLiveData<ErrorEvent<NCError>>errorEventLiveData
-
Constructor Summary
Constructors Constructor Description ChannelListViewModel(Bundle arguments)
-
Method Summary
Modifier and Type Method Description NoticeContentbuildNoticeContent(ConnectionStatus status)voidrefresh()voidremoveChannel(ChannelType channelType, String channelId)voidsetChannelTop(ChannelIdentifier identifier, boolean isTop, OperationHandler<Boolean> handler)voidonResume()LiveData<List<BaseUiChannel>>getConversationListLiveData()LiveData<NoticeContent>getNoticeContentLiveData()OnPagedDataLoadergetPagedDataLoader()voidonCleared()-
Methods inherited from class ai.nexconn.chatui.base.BaseViewModel
getArguments, getErrorEventLiveData, postErrorEvent -
Methods inherited from class androidx.lifecycle.ViewModel
addCloseable -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
buildNoticeContent
NoticeContent buildNoticeContent(ConnectionStatus status)
-
refresh
void refresh()
-
removeChannel
void removeChannel(ChannelType channelType, String channelId)
-
setChannelTop
void setChannelTop(ChannelIdentifier identifier, boolean isTop, OperationHandler<Boolean> handler)
-
onResume
void onResume()
-
getConversationListLiveData
LiveData<List<BaseUiChannel>> getConversationListLiveData()
-
getNoticeContentLiveData
LiveData<NoticeContent> getNoticeContentLiveData()
-
getPagedDataLoader
OnPagedDataLoader getPagedDataLoader()
-
onCleared
void onCleared()
-
-
-
-