Handle if no days are selected for a weekly

This commit is contained in:
Hafiz 2024-01-02 09:17:26 -05:00 committed by Phillip Thelen
parent 779110c618
commit 25e1682e68

View file

@ -379,7 +379,8 @@ open class Task : RealmObject, BaseMainObject, Parcelable, BaseTask {
// Set to start date if current date is earlier
if (dateTimeOccurenceToSchedule.isBefore(startDate)) {
dateTimeOccurenceToSchedule = startDate
} else {
} else if (repeatDays?.hasAnyDaySelected() == true) {
var nextDueDate = dateTimeOccurenceToSchedule.withHour(reminderTime.hour).withMinute(reminderTime.minute)
// If the next due date already happened for today, increment it by one day. Otherwise, it will be scheduled for today.
if (nextDueDate.isBefore(now) && occurrencesList.size == 0) {