bugfix: add filter bug
parent
b201a6758b
commit
1f5b6e18ff
|
@ -82,7 +82,9 @@ class StatisticsService {
|
||||||
Box box = Hive.box(reducedStatisticsBoxName);
|
Box box = Hive.box(reducedStatisticsBoxName);
|
||||||
Iterable<String> keys = newFood.keys;
|
Iterable<String> keys = newFood.keys;
|
||||||
for(int i = 0; i < keys.length;i++){
|
for(int i = 0; i < keys.length;i++){
|
||||||
box.put(keys.elementAt(i), newFood[keys.elementAt(i)] ?? []);
|
List<Food> alreadyExisting = castDynamicToListFood(box.get(keys.elementAt(i)));
|
||||||
|
alreadyExisting.addAll(newFood[keys.elementAt(i)] as Iterable<Food>);
|
||||||
|
box.put(keys.elementAt(i), alreadyExisting);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue