Merge pull request #86 from schrom01/fix_tasklist_filteringPastTasks

Fix tasklist filtering past tasks
This commit is contained in:
Roman Schenk 2022-12-10 14:00:24 +01:00 committed by GitHub Enterprise
commit 8a2119028c
1 changed files with 1 additions and 0 deletions

View File

@ -171,6 +171,7 @@ public class GardenSchedule {
do { do {
if (date.equals(task.getNextExecution()) || (date.equals(checkDate) && !date.isAfter(task.getEndDate().orElse(LocalDate.MIN)))) { if (date.equals(task.getNextExecution()) || (date.equals(checkDate) && !date.isAfter(task.getEndDate().orElse(LocalDate.MIN)))) {
dayTaskList.get(finalI).add(task); dayTaskList.get(finalI).add(task);
break;
} }
checkDate = checkDate.plusDays(task.getInterval().orElse(0)); checkDate = checkDate.plusDays(task.getInterval().orElse(0));
} while (!(task.getInterval().orElse(0) == 0) && checkDate.isBefore(LocalDate.now().plusDays(listLength))); } while (!(task.getInterval().orElse(0) == 0) && checkDate.isBefore(LocalDate.now().plusDays(listLength)));