From 1f5b6e18ff34992a7f39d199617deeb6bee8058d Mon Sep 17 00:00:00 2001 From: 98spag Date: Tue, 30 May 2023 18:02:13 +0200 Subject: [PATCH] bugfix: add filter bug --- lib/android/config/statistics.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/android/config/statistics.dart b/lib/android/config/statistics.dart index 3bb8040..ba306da 100644 --- a/lib/android/config/statistics.dart +++ b/lib/android/config/statistics.dart @@ -82,7 +82,9 @@ class StatisticsService { Box box = Hive.box(reducedStatisticsBoxName); Iterable keys = newFood.keys; for(int i = 0; i < keys.length;i++){ - box.put(keys.elementAt(i), newFood[keys.elementAt(i)] ?? []); + List alreadyExisting = castDynamicToListFood(box.get(keys.elementAt(i))); + alreadyExisting.addAll(newFood[keys.elementAt(i)] as Iterable); + box.put(keys.elementAt(i), alreadyExisting); } }