Class GroupMemberListViewModel
-
- All Implemented Interfaces:
-
ai.nexconn.chatui.base.interfaces.OnPagedDataLoader
public class GroupMemberListViewModel extends BaseViewModel implements OnPagedDataLoader
ViewModel for group member list.
- Since:
5.12.0
-
-
Field Summary
Fields Modifier and Type Field Description protected final GroupMembersPagedHandlergroupMembersPagedHandlerprotected final GroupMembersSearchPagedHandlergroupMembersSearchPagedHandlerprotected final GroupInfoHandlergroupInfoHandlerprotected final MutableLiveData<ErrorEvent<NCError>>errorEventLiveData
-
Constructor Summary
Constructors Constructor Description GroupMemberListViewModel(Bundle arguments)
-
Method Summary
Modifier and Type Method Description LiveData<List<ContactModel>>getFilteredContactsLiveData()LiveData<GroupInfo>getGroupInfoLiveData()voidqueryContacts(@NonNull() String query)Query contacts. voidloadNext(OnDataChangeListener<Boolean> listener)Loads the next page of data. booleanhasNext()Returns whether there is a next page. voidonCleared()-
Methods inherited from class ai.nexconn.chatui.base.BaseViewModel
getArguments, getErrorEventLiveData, postErrorEvent -
Methods inherited from class ai.nexconn.chatui.base.interfaces.OnPagedDataLoader
hasPrevious, loadPrevious -
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
-
getFilteredContactsLiveData
LiveData<List<ContactModel>> getFilteredContactsLiveData()
-
getGroupInfoLiveData
LiveData<GroupInfo> getGroupInfoLiveData()
-
queryContacts
void queryContacts(@NonNull() String query)
Query contacts.
- Parameters:
query- search keyword
-
loadNext
void loadNext(OnDataChangeListener<Boolean> listener)
Loads the next page of data.
- Parameters:
listener- the load completion listener
-
hasNext
boolean hasNext()
Returns whether there is a next page.
- Returns:
true if more data is available
-
onCleared
void onCleared()
-
-
-
-