Improve Rx pipeline

This commit is contained in:
topjohnwu
2019-07-28 14:49:06 -07:00
parent b2e6ba3c4a
commit c15f80b33f
2 changed files with 30 additions and 29 deletions
@@ -63,9 +63,7 @@ class ModuleViewModel(
.toList()
.map { it to itemsInstalled.calculateDiff(it) }
.doOnSuccessUi { itemsInstalled.update(it.first, it.second) }
.toFlowable()
.flatMap { repoUpdater(force) }
.collect({}, {_, _ -> })
.flattenAsFlowable { repoDB.repos }
.map { RepoRvItem(it) }
.toList()