Last active
May 7, 2021 01:56
-
-
Save ChristopherME/508ede7590a8ff385498c80c861f741b to your computer and use it in GitHub Desktop.
Holds the state of the MovieListFragment.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Represents the state to render the UI in MovieListFragment. | |
* | |
* @param isLoading if true we have to show a progress bar, else hide the progress bar. | |
* @param movies this list will be submited into recyclerview adapter. | |
* @param error OneTimeEvent that wraps a failure object for display a Toast, Snackbar, etc only once. | |
*/ | |
data class MovieListUiState( | |
val isLoading: Boolean = false, | |
val movies: List<MovieUi> = emptyList(), | |
val error: OneTimeEvent<Failure>? = null | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment