mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-30 13:35:27 +00:00
Fixed multiple fetch tasks running at once
Disposing wouldn't help since the shell doesn't appear to handle concurrency well
This commit is contained in:
parent
b77c590910
commit
5dd677756f
@ -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)) }
|
||||
|
Loading…
Reference in New Issue
Block a user