From 6631c7766a8219c5fcf5e43e26efa9bbb35b698e Mon Sep 17 00:00:00 2001 From: 98spag Date: Tue, 30 May 2023 14:53:02 +0200 Subject: [PATCH] cleanup: remove unnecessary method --- lib/android/config/statistics.dart | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) 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;