|
|
@ -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);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|