class CharactersListViewModel : ViewModel
View model responsible for preparing and managing the data for CharactersListFragment.
See Also
<init> |
View model responsible for preparing and managing the data for CharactersListFragment. CharactersListViewModel(dataSourceFactory: CharactersPageDataSourceFactory) |
data |
val data: LiveData<PagedList<CharacterItem!>!> |
dataSourceFactory |
val dataSourceFactory: CharactersPageDataSourceFactory |
event |
val event: SingleLiveData<CharactersListViewEvent> |
networkState |
val networkState: LiveData<NetworkState!> |
state |
val state: LiveData<CharactersListViewState!> |
openCharacterDetail |
Send interaction event for open character detail view from selected character. fun openCharacterDetail(characterId: Long): Unit |
refreshLoadedCharactersList |
Refresh characters fetch them again and update the list. fun refreshLoadedCharactersList(): Unit |
retryAddCharactersList |
Retry last fetch operation to add characters into list. fun retryAddCharactersList(): Unit |