Skip to content

Commit

Permalink
feat: optimize getting tasks for notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Benimautner committed Sep 30, 2024
1 parent c54a0a7 commit c2b2b2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/managers/notifications.dart
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class NotificationClass {

Future<void> scheduleDueNotifications(TaskService taskService,
{List<Task>? tasks}) async {
if (tasks == null) tasks = await taskService.getAll();
if (tasks == null) tasks = await taskService.getByFilterString("done=false && (due_date > now || reminders > now)", {"filter_include_nulls": ["false"]});
if (tasks == null) {
print("did not receive tasks on notification update");
return;
Expand Down Expand Up @@ -153,7 +153,7 @@ class NotificationClass {
platformChannelSpecificsDueDate,
id: task.id,
);
print("scheduled notification for time " + task.dueDate!.toString());
//print("scheduled notification for time " + task.dueDate!.toString());
}
}
print("notifications scheduled successfully");
Expand Down

0 comments on commit c2b2b2e

Please sign in to comment.