Add support for combined notifications
This commit is contained in:
@@ -28,15 +28,7 @@ async function run(config: Config, db: TaskDatabase, tasks?: Task[]) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (const task of tasks) {
|
||||
console.info(`Dispatching a notification: [${task.label}]`)
|
||||
for (const backend of backends) {
|
||||
backend.remind(config, task);
|
||||
await snooze(1500);
|
||||
}
|
||||
for (const backend of backends) {
|
||||
await backend.remind(config, tasks);
|
||||
}
|
||||
}
|
||||
|
||||
function snooze(ms: number) {
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
Reference in New Issue
Block a user