mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-28 17:47:38 +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…
x
Reference in New Issue
Block a user