Fix scheduling next notification

pull/618/head
Alex Baker 7 years ago
parent 40e1f47e87
commit 6d56dc26ad

@ -106,7 +106,8 @@ public class JobQueue {
public synchronized boolean remove(List<? extends JobQueueEntry> entries) { public synchronized boolean remove(List<? extends JobQueueEntry> entries) {
boolean success = true; boolean success = true;
for (JobQueueEntry entry : entries) { for (JobQueueEntry entry : entries) {
success &= jobs.remove(entry.getTime(), entry); success &= !jobs.containsEntry(entry.getTime(), entry) ||
jobs.remove(entry.getTime(), entry);
} }
return success; return success;
} }

@ -322,7 +322,7 @@ public class NotificationManager {
// update last reminder time // update last reminder time
task.setReminderLast(new DateTime(when).endOfMinute().getMillis()); task.setReminderLast(new DateTime(when).endOfMinute().getMillis());
taskDao.saveExisting(task); taskDao.save(task);
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, NotificationManager.NOTIFICATION_CHANNEL_DEFAULT) NotificationCompat.Builder builder = new NotificationCompat.Builder(context, NotificationManager.NOTIFICATION_CHANNEL_DEFAULT)
.setCategory(NotificationCompat.CATEGORY_REMINDER) .setCategory(NotificationCompat.CATEGORY_REMINDER)

Loading…
Cancel
Save