Fixed loading showing in incorrect view-states

This commit is contained in:
Viktor De Pasquale
2019-11-16 19:20:44 +01:00
parent 0f140b408c
commit b744bb0a5a
2 changed files with 4 additions and 5 deletions

View File

@@ -122,9 +122,8 @@ class ModuleViewModel(
moveToState()
}
fun loadRemoteImplicit() = downloadRepos()
.observeOn(AndroidSchedulers.mainThread())
.doOnComplete { items.clear(); itemsSearch.clear() }
fun loadRemoteImplicit() = let { items.clear(); itemsSearch.clear() }
.run { downloadRepos() }
.applyViewModel(this, false)
.subscribeK { refresh(); submitQuery() }
.add()