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…
Reference in New Issue
Block a user