mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 19:32:16 +00:00
Fix: Refresh updates list after update/install
This commit is contained in:
parent
285f417967
commit
7f33d6efc7
@ -272,6 +272,9 @@ interface InstalledDao : BaseDao<Installed> {
|
|||||||
installed.forEach { insertReplace(it) }
|
installed.forEach { insertReplace(it) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@get:Query("SELECT * FROM memory_installed")
|
||||||
|
val allLive: LiveData<List<Installed>>
|
||||||
|
|
||||||
@Query("SELECT * FROM memory_installed WHERE package_name = :packageName")
|
@Query("SELECT * FROM memory_installed WHERE package_name = :packageName")
|
||||||
fun get(packageName: String): Installed?
|
fun get(packageName: String): Installed?
|
||||||
|
|
||||||
|
@ -99,6 +99,15 @@ class MainNavFragmentViewModelX(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (secondarySource == Source.UPDATES) {
|
||||||
|
secondaryProducts.addSource(db.installedDao.allLive) {
|
||||||
|
viewModelScope.launch {
|
||||||
|
withContext(Dispatchers.IO) {
|
||||||
|
secondaryProducts.postValue(db.productDao.queryObject(secondaryRequest))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setSection(newSection: Section) {
|
fun setSection(newSection: Section) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user