mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-18 02:08:20 +00:00
Caching last predictions and loading it with model
Adding support for persisting itemInfos on disk. This uses a separate xml file. Unlike prefs, it does not keep the items in memory and is just a wraper over reading/writing a file. Bug: 160748731 Change-Id: Iaccab9928ab8f30127fb3c2d630ca8ca83f0bd05
This commit is contained in:
@@ -424,6 +424,14 @@ public class BgDataModel {
|
||||
public FixedContainerItems clone() {
|
||||
return new FixedContainerItems(containerId, new ArrayList<>(items));
|
||||
}
|
||||
|
||||
public void setItems(List<ItemInfo> newItems) {
|
||||
items.clear();
|
||||
newItems.forEach(item -> {
|
||||
item.container = containerId;
|
||||
items.add(item);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user