aboutsummaryrefslogtreecommitdiffstats
path: root/src/webview/notifications.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/webview/notifications.js')
-rw-r--r--src/webview/notifications.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/webview/notifications.js b/src/webview/notifications.js
index 97ce9d69b..b3397148d 100644
--- a/src/webview/notifications.js
+++ b/src/webview/notifications.js
@@ -7,13 +7,13 @@ class Notification {
7 this.title = title; 7 this.title = title;
8 this.options = options; 8 this.options = options;
9 this.notificationId = uuidV1(); 9 this.notificationId = uuidV1();
10 this.onclick = () => {}; 10 this.onclick = () => { };
11 11
12 ipcRenderer.sendToHost('notification', { 12 ipcRenderer.sendToHost('notification', Notification.onNotify({
13 notificationId: this.notificationId, 13 notificationId: this.notificationId,
14 title, 14 title,
15 options, 15 options,
16 }); 16 }));
17 17
18 ipcRenderer.on(`notification-onclick:${this.notificationId}`, () => { 18 ipcRenderer.on(`notification-onclick:${this.notificationId}`, () => {
19 this.onclick(); 19 this.onclick();
@@ -42,4 +42,6 @@ Notification.close = () => {
42 // no implementation yet 42 // no implementation yet
43}; 43};
44 44
45Notification.onNotify = data => data;
46
45window.Notification = Notification; 47window.Notification = Notification;