Created
February 17, 2019 17:39
-
-
Save gumil/b696e668a6c3039aa0f2816c39fffe63 to your computer and use it in GitHub Desktop.
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
internal sealed class ListState : State { | |
data class Screen( | |
val giphies: List<GiphyItem> = emptyList(), | |
val loadingMode: Mode = Mode.IDLE_REFRESH | |
) : ListState() | |
data class Error( | |
val errorMessage: Int | |
) : ListState(), SingleEvent | |
data class GoToDetail( | |
val giphy: GiphyItem | |
) : ListState(), SingleEvent | |
enum class Mode { | |
REFRESH, LOAD_MORE, IDLE_REFRESH, IDLE_LOAD_MORE | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment