mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-21 21:29:00 +00:00
speed up ContentCache with async safe calls
This commit is contained in:
parent
7f0d6f8366
commit
10476415cc
1 changed files with 5 additions and 6 deletions
|
|
@ -183,17 +183,16 @@ public class ContentCache {
|
|||
|
||||
if (quest.boss != null) {
|
||||
quest.boss.key = quest.key;
|
||||
quest.boss.save();
|
||||
quest.boss.async().save();
|
||||
}
|
||||
}
|
||||
|
||||
contentResult.armoire.save();
|
||||
contentResult.potion.save();
|
||||
|
||||
Collection<ItemData> itemList = contentResult.gear.flat.values();
|
||||
Collection<ItemData> itemList = new ArrayList<>(contentResult.gear.flat.values());
|
||||
itemList.add(contentResult.armoire);
|
||||
itemList.add(contentResult.potion);
|
||||
|
||||
for (ItemData item : itemList) {
|
||||
item.save();
|
||||
item.async().save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue