Created
August 25, 2019 02:22
-
-
Save ahmedrizwan/eadb76b023de1bf44b0745a4a9fcf040 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
sealed class UIState<out R> { | |
object Loading : UIState<Nothing>() | |
object Retrying : UIState<Nothing>() | |
object SwipeRefreshing : UIState<Nothing>() | |
data class Success<T>(val data: T) : UIState<T>() | |
data class Failure(val exception: Exception) : UIState<Nothing>() | |
data class SwipeRefreshFailure(val exception: Exception) : UIState<Nothing>() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment