Room : continue improving members loading
This commit is contained in:
parent
f02ee307cc
commit
b0152059ff
26 changed files with 329 additions and 166 deletions
|
|
@ -47,7 +47,9 @@ suspend fun <T> (suspend () -> T).execute(state: MutableState<Async<T>>, errorMa
|
|||
}
|
||||
|
||||
suspend fun <T> (suspend () -> Result<T>).executeResult(state: MutableState<Async<T>>) {
|
||||
state.value = Async.Loading()
|
||||
if (state.value !is Async.Success) {
|
||||
state.value = Async.Loading()
|
||||
}
|
||||
this().fold(
|
||||
onSuccess = {
|
||||
state.value = Async.Success(it)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue