mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-20 12:49:02 +00:00
fix realm crash Fixes #1224
This commit is contained in:
parent
90f792804d
commit
06fd4d191e
1 changed files with 1 additions and 1 deletions
|
|
@ -227,7 +227,7 @@ class RealmInventoryLocalRepository(realm: Realm, private val context: Context)
|
|||
|
||||
override fun saveInAppRewards(onlineItems: List<ShopItem>) {
|
||||
val localItems = realm.where(ShopItem::class.java).findAll().createSnapshot()
|
||||
executeTransactionAsync {
|
||||
executeTransaction {
|
||||
for (localItem in localItems) {
|
||||
if (!onlineItems.contains(localItem)) {
|
||||
localItem.deleteFromRealm()
|
||||
|
|
|
|||
Loading…
Reference in a new issue