diff --git a/lib/android/config/statistics.dart b/lib/android/config/statistics.dart index 00d11aa..f72df78 100644 --- a/lib/android/config/statistics.dart +++ b/lib/android/config/statistics.dart @@ -82,18 +82,10 @@ class StatisticsService { Box box = Hive.box(reducedStatisticsBoxName); Iterable keys = newFood.keys; for(int i = 0; i < keys.length;i++){ - addValuesToList(box, keys.elementAt(i), newFood[keys.elementAt(i)] ?? []); + box.put(keys.elementAt(i), newFood[keys.elementAt(i)] ?? []); } } - void addValuesToList(Box box, String key, List newValues){ - List existingList = castDynamicToListFood(box.get(key)); - for(int i = 0; i < newValues.length;i++){ - existingList.add(newValues[i]); - } - box.put(key, existingList); - } - getDayAsIntFromTimestamp(int timestamp){ DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(timestamp * 1000); return dateTime.day;