bugfix: add filter bug

feature/chart-progress-page
98spag 2023-05-30 18:02:13 +02:00
parent b201a6758b
commit 1f5b6e18ff
1 changed files with 3 additions and 1 deletions

View File

@ -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);
} }
} }