Permalink
Browse files

overdue alarm is still scheudled if task ain't due

  • Loading branch information...
1 parent 5b5dd9e commit 7a6fe4925956e31a270144f6e247c1a962ef9ce0 @timsu timsu committed Aug 17, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 astrid/plugin-src/com/todoroo/astrid/reminders/ReminderService.java
View
6 astrid/plugin-src/com/todoroo/astrid/reminders/ReminderService.java
@@ -195,9 +195,9 @@ else if(whenOverdue != NO_ALARM)
private long calculateNextOverdueReminder(Task task) {
if(task.hasDueDate() && task.getFlag(Task.REMINDER_FLAGS, Task.NOTIFY_AFTER_DEADLINE)) {
long dueDate = task.getValue(Task.DUE_DATE);
- if(dueDate > DateUtilities.now())
- return NO_ALARM;
- return DateUtilities.now() + (long)((4 + 30 * random.nextFloat()) * DateUtilities.ONE_HOUR);
+ if(dueDate < DateUtilities.now())
+ dueDate = DateUtilities.now();
+ return dueDate + (long)((4 + 30 * random.nextFloat()) * DateUtilities.ONE_HOUR);
}
return NO_ALARM;
}

0 comments on commit 7a6fe49

Please sign in to comment.