mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 23:42:00 +01:00
Reset the plan's logs when loading new ones
This commit is contained in:
@@ -346,6 +346,7 @@ class NutritionPlansProvider extends WgerBaseProvider with ChangeNotifier {
|
||||
makeUrl(_nutritionDiaryPath, query: {'plan': plan.id.toString(), 'limit': '1000'}),
|
||||
);
|
||||
|
||||
plan.logs = [];
|
||||
for (var logData in data['results']) {
|
||||
var log = Log.fromJson(logData);
|
||||
final ingredient = await fetchIngredient(log.ingredientId);
|
||||
|
||||
Reference in New Issue
Block a user