Skip to content

Commit

Permalink
Fix #79, add example notification to menu
Browse files Browse the repository at this point in the history
  • Loading branch information
cassidoo committed Feb 25, 2020
1 parent 9d3d6f1 commit a63eca9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
13 changes: 12 additions & 1 deletion public/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const {
Menu,
dialog,
powerMonitor,
shell
shell,
Notification
} = require("electron");
const Store = require("electron-store");
const isDev = require("electron-is-dev");
Expand Down Expand Up @@ -181,6 +182,16 @@ function menuSetup() {
}
}
]
},
{
label: "Show example notification",
click: e => {
let exNotification = new Notification({
title: "todometer reminder!",
body: "Here's an example todometer notification!"
});
exNotification.show();
}
}
]
}
Expand Down
3 changes: 1 addition & 2 deletions src/hooks/useReminderNotification.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ export default function useReminderNotification() {
paused.length
} paused for later)`;

// eslint-disable-next-line
let reminderNotification = new Notification("todometer reminder!", {
new Notification("todometer reminder!", {
body: text
});
}
Expand Down

0 comments on commit a63eca9

Please sign in to comment.