mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-06-08 00:39:54 +00:00
Fix: Apps uninstalled externaly when app is not running persists
This commit is contained in:
parent
bcf008578f
commit
f39a1abf97
@ -66,6 +66,7 @@ class MainApplication : Application(), ImageLoaderFactory {
|
||||
.getInstalledPackages(Android.PackageManager.signaturesFlag)
|
||||
.map { it.toInstalledItem() }
|
||||
CoroutineScope(Dispatchers.Default).launch {
|
||||
db.installedDao.emptyTable()
|
||||
db.installedDao.put(*installedItems.toTypedArray())
|
||||
}
|
||||
}
|
||||
|
@ -280,6 +280,9 @@ interface InstalledDao : BaseDao<Installed> {
|
||||
|
||||
@Query("DELETE FROM memory_installed WHERE package_name = :packageName")
|
||||
fun delete(packageName: String)
|
||||
|
||||
@Query("DELETE FROM memory_installed")
|
||||
fun emptyTable()
|
||||
}
|
||||
|
||||
@Dao
|
||||
|
Loading…
x
Reference in New Issue
Block a user