Fix reset from settings not refreshing

pull/592/head
pkorove 5 years ago
parent 74e44e9843
commit 65623ea08e

@ -45,8 +45,15 @@ public class ResetHabitsCommand extends Command
habitList.update(selected); habitList.update(selected);
} else { } else {
for (Habit h : habitList) { for (Habit h : habitList) {
h.getRepetitions().removeAll(); // h.getRepetitions().removeAll();
habitList.update(h); // habitList.update(h);
RepetitionList repetitionList = h.getRepetitions();
Repetition rep;
while(repetitionList.getTotalCount() != 0) {
rep = repetitionList.getOldest();
repetitionList.toggle(rep.getTimestamp());
repetitionList.remove(rep);
}
} }
} }
} }

Loading…
Cancel
Save