Skip to content

Commit

Permalink
Handle if no days are selected for a weekly
Browse files Browse the repository at this point in the history
  • Loading branch information
Hafizzle committed Jan 2, 2024
1 parent 1fec8ef commit 5daa8ba
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 5daa8ba

Please sign in to comment.