From 47681c90b0067d8b979f1a88253973fea49741bc Mon Sep 17 00:00:00 2001 From: Gustavo Sampaio Date: Fri, 27 Oct 2017 22:35:44 -0300 Subject: Add onNotify event to let recipes update/change notifications before send them. Add additional checks in ServiceStore. --- src/webview/notifications.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/webview/notifications.js') 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 { this.title = title; this.options = options; this.notificationId = uuidV1(); - this.onclick = () => {}; + this.onclick = () => { }; - ipcRenderer.sendToHost('notification', { + ipcRenderer.sendToHost('notification', Notification.onNotify({ notificationId: this.notificationId, title, options, - }); + })); ipcRenderer.on(`notification-onclick:${this.notificationId}`, () => { this.onclick(); @@ -42,4 +42,6 @@ Notification.close = () => { // no implementation yet }; +Notification.onNotify = data => data; + window.Notification = Notification; -- cgit v1.2.3-70-g09d2