Skip to content

Commit a63eca9

Browse files
committed
Fix #79, add example notification to menu
1 parent 9d3d6f1 commit a63eca9

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

public/electron.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ const {
44
Menu,
55
dialog,
66
powerMonitor,
7-
shell
7+
shell,
8+
Notification
89
} = require("electron");
910
const Store = require("electron-store");
1011
const isDev = require("electron-is-dev");
@@ -181,6 +182,16 @@ function menuSetup() {
181182
}
182183
}
183184
]
185+
},
186+
{
187+
label: "Show example notification",
188+
click: e => {
189+
let exNotification = new Notification({
190+
title: "todometer reminder!",
191+
body: "Here's an example todometer notification!"
192+
});
193+
exNotification.show();
194+
}
184195
}
185196
]
186197
}

src/hooks/useReminderNotification.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ export default function useReminderNotification() {
3737
paused.length
3838
} paused for later)`;
3939

40-
// eslint-disable-next-line
41-
let reminderNotification = new Notification("todometer reminder!", {
40+
new Notification("todometer reminder!", {
4241
body: text
4342
});
4443
}

0 commit comments

Comments
 (0)