class CharactersFavoriteViewModel : ViewModel
View model responsible for preparing and managing the data for CharactersFavoriteFragment.
See Also
<init> |
View model responsible for preparing and managing the data for CharactersFavoriteFragment. CharactersFavoriteViewModel(characterFavoriteRepository: CharacterFavoriteRepository) |
characterFavoriteRepository |
val characterFavoriteRepository: CharacterFavoriteRepository |
data |
val data: LiveData<List<CharacterFavorite>> |
state |
val state: LiveData<CharactersFavoriteViewState!> |
removeFavoriteCharacter |
Remove the selected favorite character from database in case if exist. fun removeFavoriteCharacter(character: CharacterFavorite): Unit |