mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-02-26 05:57:25 +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() {
|
fun updatePolicies() {
|
||||||
fetchTask?.dispose()
|
if (fetchTask?.isDisposed?.not() == true) return
|
||||||
fetchTask = appRepo.fetchAll()
|
fetchTask = appRepo.fetchAll()
|
||||||
.flattenAsFlowable { it }
|
.flattenAsFlowable { it }
|
||||||
.map { PolicyRvItem(it, it.applicationInfo.loadIcon(packageManager)) }
|
.map { PolicyRvItem(it, it.applicationInfo.loadIcon(packageManager)) }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user