fixed problem "showing task multiple times in in schedule"

This commit is contained in:
schrom01 2022-12-10 13:52:33 +01:00
parent 5f7d690875
commit 0074d43364
1 changed files with 1 additions and 0 deletions

View File

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