Skip to content

Commit

Permalink
Updated fixmes
Browse files Browse the repository at this point in the history
  • Loading branch information
Faltenreich committed Jan 8, 2022
1 parent d888f1e commit 387d752
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<Measurement> measurements = entry.getMeasurementCache();
if (measurements != null && !measurements.isEmpty()) {
Collections.sort(measurements, CategoryComparatorFactory.getInstance().createComparatorFromMeasurements());
Expand Down Expand Up @@ -557,7 +558,6 @@ private void deleteEntry() {
}
}

// FIXME: Adds previously deleted food when adding another one
private List<FoodEaten> getFoodEaten() {
for (int index = 0; index < measurementContainer.getChildCount(); index++) {
View view = measurementContainer.getChildAt(index);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 387d752

Please sign in to comment.