mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-22 19:02:12 +00:00
Fix: Crash on trying to readd/update data in installed table
This commit is contained in:
parent
88776cbe04
commit
814052d821
@ -13,6 +13,9 @@ interface BaseDao<T> {
|
|||||||
@Insert
|
@Insert
|
||||||
fun insert(vararg product: T)
|
fun insert(vararg product: T)
|
||||||
|
|
||||||
|
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||||
|
fun insertReplace(vararg product: T)
|
||||||
|
|
||||||
@Update(onConflict = OnConflictStrategy.REPLACE)
|
@Update(onConflict = OnConflictStrategy.REPLACE)
|
||||||
fun update(vararg obj: T): Int
|
fun update(vararg obj: T): Int
|
||||||
|
|
||||||
@ -186,7 +189,7 @@ interface CategoryDao : BaseDao<Category> {
|
|||||||
interface InstalledDao : BaseDao<Installed> {
|
interface InstalledDao : BaseDao<Installed> {
|
||||||
fun put(vararg isntalled: com.looker.droidify.entity.InstalledItem) {
|
fun put(vararg isntalled: com.looker.droidify.entity.InstalledItem) {
|
||||||
isntalled.forEach {
|
isntalled.forEach {
|
||||||
insert(Installed(it.packageName).apply {
|
insertReplace(Installed(it.packageName).apply {
|
||||||
version = it.version
|
version = it.version
|
||||||
version_code = it.versionCode
|
version_code = it.versionCode
|
||||||
signature = it.signature
|
signature = it.signature
|
||||||
|
Loading…
x
Reference in New Issue
Block a user