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)
|
.getInstalledPackages(Android.PackageManager.signaturesFlag)
|
||||||
.map { it.toInstalledItem() }
|
.map { it.toInstalledItem() }
|
||||||
CoroutineScope(Dispatchers.Default).launch {
|
CoroutineScope(Dispatchers.Default).launch {
|
||||||
|
db.installedDao.emptyTable()
|
||||||
db.installedDao.put(*installedItems.toTypedArray())
|
db.installedDao.put(*installedItems.toTypedArray())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -280,6 +280,9 @@ interface InstalledDao : BaseDao<Installed> {
|
|||||||
|
|
||||||
@Query("DELETE FROM memory_installed WHERE package_name = :packageName")
|
@Query("DELETE FROM memory_installed WHERE package_name = :packageName")
|
||||||
fun delete(packageName: String)
|
fun delete(packageName: String)
|
||||||
|
|
||||||
|
@Query("DELETE FROM memory_installed")
|
||||||
|
fun emptyTable()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Dao
|
@Dao
|
||||||
|
Loading…
x
Reference in New Issue
Block a user