mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-02-20 07:08:28 +00:00
Delete outdated policies when refresh
This commit is contained in:
parent
ee0ec3fbfa
commit
d05408c89f
@ -55,6 +55,7 @@ class SuperuserViewModel(
|
|||||||
}
|
}
|
||||||
state = State.LOADING
|
state = State.LOADING
|
||||||
val (policies, diff) = withContext(Dispatchers.Default) {
|
val (policies, diff) = withContext(Dispatchers.Default) {
|
||||||
|
db.deleteOutdated()
|
||||||
val policies = db.fetchAll {
|
val policies = db.fetchAll {
|
||||||
PolicyRvItem(it, it.icon, this@SuperuserViewModel)
|
PolicyRvItem(it, it.icon, this@SuperuserViewModel)
|
||||||
}.sortedWith(compareBy(
|
}.sortedWith(compareBy(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user