Improve code and display error.
This commit is contained in:
parent
4bd01b6f4f
commit
e64051f7bd
6 changed files with 94 additions and 38 deletions
|
|
@ -86,6 +86,8 @@ sealed interface AsyncAction<out T> {
|
|||
fun isFailure(): Boolean = this is Failure
|
||||
|
||||
fun isSuccess(): Boolean = this is Success
|
||||
|
||||
fun isReady() = isSuccess() || isFailure()
|
||||
}
|
||||
|
||||
suspend inline fun <T> MutableState<AsyncAction<T>>.runCatchingUpdatingState(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue