Skip to content

Commit

Permalink
Error on the side of showing reminder (Even if reminder time passed)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hafizzle committed Nov 21, 2023
1 parent b804f9b commit 13bfdba
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,7 @@ open class Task : RealmObject, BaseMainObject, Parcelable, BaseTask {
// Check if the reminder is scheduled to repeat today
val repeatingDays = repeat?.dayStrings(context)
val isScheduledForToday = repeatingDays?.find { day -> day == zonedDateTimeNow.dayOfWeekString() }
// Check if reminder time already passed
val isReminderTimePassed = reminderTime?.isBefore(zonedDateTimeNow) == true
if (isScheduledForToday != null && !isReminderTimePassed) {
if (isScheduledForToday != null) {
val currentDateTime = LocalDateTime.now()
val updatedDateTime: LocalDateTime = LocalDateTime.of(
currentDateTime.year,
Expand Down

0 comments on commit 13bfdba

Please sign in to comment.