Don't save task if reminder time did not change

pull/795/head
Alex Baker 6 years ago
parent 90867839d4
commit b70c8fe5cb

@ -355,8 +355,11 @@ public class NotificationManager {
final String taskDescription = task.getNotes(); final String taskDescription = task.getNotes();
// update last reminder time // update last reminder time
task.setReminderLast(new DateTime(when).endOfMinute().getMillis()); long reminderTime = new DateTime(when).endOfMinute().getMillis();
taskDao.save(task); if (reminderTime != task.getReminderLast()) {
task.setReminderLast(reminderTime);
taskDao.save(task);
}
NotificationCompat.Builder builder = NotificationCompat.Builder builder =
new NotificationCompat.Builder(context, NotificationManager.NOTIFICATION_CHANNEL_DEFAULT) new NotificationCompat.Builder(context, NotificationManager.NOTIFICATION_CHANNEL_DEFAULT)

Loading…
Cancel
Save