Commit 5dd67775 authored by Viktor De Pasquale's avatar Viktor De Pasquale Committed by topjohnwu

Fixed multiple fetch tasks running at once

Disposing wouldn't help since the shell doesn't appear to handle concurrency well
parent b77c5909
......@@ -53,7 +53,7 @@ class SuperuserViewModel(
}
fun updatePolicies() {
fetchTask?.dispose()
if (fetchTask?.isDisposed?.not() == true) return
fetchTask = appRepo.fetchAll()
.flattenAsFlowable { it }
.map { PolicyRvItem(it, it.applicationInfo.loadIcon(packageManager)) }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment