no need to schedule notification if it has no due date set

This commit is contained in:
benimautner 2022-04-20 00:31:03 +02:00
parent a6fab24598
commit 3688df4811
1 changed files with 2 additions and 1 deletions

View File

@ -109,7 +109,8 @@ class VikunjaGlobalState extends State<VikunjaGlobal> {
task.reminders.forEach((reminder) {
scheduleNotification("This is your reminder for '" + task.title + "'", task.description, notificationsPlugin, reminder);
});
scheduleNotification("The task '" + task.title + "' is due.", task.description, notificationsPlugin, task.due);
if(task.due != null)
scheduleNotification("The task '" + task.title + "' is due.", task.description, notificationsPlugin, task.due);
})
);
});