From 387d7522ed0b7720396b9a3ae9788cd3c4ae4bbb Mon Sep 17 00:00:00 2001 From: Philipp Fahlteich Date: Sat, 8 Jan 2022 19:05:21 +0100 Subject: [PATCH] Updated fixmes --- .../diaguard/feature/entry/edit/EntryEditFragment.java | 2 +- .../faltenreich/diaguard/feature/food/input/FoodInputView.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/faltenreich/diaguard/feature/entry/edit/EntryEditFragment.java b/app/src/main/java/com/faltenreich/diaguard/feature/entry/edit/EntryEditFragment.java index 4d01221cf..c111505dc 100644 --- a/app/src/main/java/com/faltenreich/diaguard/feature/entry/edit/EntryEditFragment.java +++ b/app/src/main/java/com/faltenreich/diaguard/feature/entry/edit/EntryEditFragment.java @@ -257,6 +257,7 @@ private void initData() { private void setEntry(@NonNull Entry entry) { noteInput.setText(entry.getNote()); + // FIXME: Previous order gets ignored on Fragment recreation List measurements = entry.getMeasurementCache(); if (measurements != null && !measurements.isEmpty()) { Collections.sort(measurements, CategoryComparatorFactory.getInstance().createComparatorFromMeasurements()); @@ -557,7 +558,6 @@ private void deleteEntry() { } } - // FIXME: Adds previously deleted food when adding another one private List getFoodEaten() { for (int index = 0; index < measurementContainer.getChildCount(); index++) { View view = measurementContainer.getChildAt(index); diff --git a/app/src/main/java/com/faltenreich/diaguard/feature/food/input/FoodInputView.java b/app/src/main/java/com/faltenreich/diaguard/feature/food/input/FoodInputView.java index 1d072c6fb..4c65521a6 100644 --- a/app/src/main/java/com/faltenreich/diaguard/feature/food/input/FoodInputView.java +++ b/app/src/main/java/com/faltenreich/diaguard/feature/food/input/FoodInputView.java @@ -172,10 +172,10 @@ public Meal getMeal() { return meal; } - // FIXME: Previously cached but removed food eaten gets added obsoletely public void setMeal(Meal meal) { this.meal = meal; this.inputValueInputField.setText(meal.getValuesForUI()[0]); + // FIXME: Previously cached but removed food eaten gets added obsoletely if (meal.getFoodEatenCache().isEmpty()) { addItems(meal.getFoodEaten()); } else {