mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Room : continue improving members loading
This commit is contained in:
+3
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user