From 3688df48116a759b1f237da591fe5a57037c54a7 Mon Sep 17 00:00:00 2001 From: benimautner Date: Wed, 20 Apr 2022 00:31:03 +0200 Subject: [PATCH] no need to schedule notification if it has no due date set --- lib/global.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/global.dart b/lib/global.dart index 2227427..7d16925 100644 --- a/lib/global.dart +++ b/lib/global.dart @@ -109,7 +109,8 @@ class VikunjaGlobalState extends State { 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); }) ); });