diff options
author | Vijay A <avijayr@protonmail.com> | 2021-08-16 23:13:06 +0530 |
---|---|---|
committer | Vijay A <avijayr@protonmail.com> | 2021-08-16 23:13:06 +0530 |
commit | bbed06e2ba255199703343625129712ef7707697 (patch) | |
tree | 19a525fbd1d621a6e561b1a687195269e54f43d5 /src/webview | |
parent | chore: update outdated node_modules (#1807) (diff) | |
download | ferdium-app-bbed06e2ba255199703343625129712ef7707697.tar.gz ferdium-app-bbed06e2ba255199703343625129712ef7707697.tar.zst ferdium-app-bbed06e2ba255199703343625129712ef7707697.zip |
Revert "chore: update outdated node_modules (#1807)"
This reverts commit 26a9dba22236bc22a7612107630282cfe02d20e0.
Diffstat (limited to 'src/webview')
-rw-r--r-- | src/webview/notifications.js | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/webview/notifications.js b/src/webview/notifications.js index 73cdb89d4..205a3220c 100644 --- a/src/webview/notifications.js +++ b/src/webview/notifications.js | |||
@@ -1,25 +1,22 @@ | |||
1 | import { ipcRenderer } from 'electron'; | 1 | import { ipcRenderer } from 'electron'; |
2 | import { v1 as uuidV1 } from 'uuid'; | 2 | import uuidV1 from 'uuid/v1'; |
3 | 3 | ||
4 | const debug = require('debug')('Ferdi:Notifications'); | 4 | const debug = require('debug')('Ferdi:Notifications'); |
5 | 5 | ||
6 | export class NotificationsHandler { | 6 | export class NotificationsHandler { |
7 | onNotify = data => data; | 7 | onNotify = (data) => data; |
8 | 8 | ||
9 | displayNotification(title, options) { | 9 | displayNotification(title, options) { |
10 | return new Promise(resolve => { | 10 | return new Promise((resolve) => { |
11 | debug('New notification', title, options); | 11 | debug('New notification', title, options); |
12 | 12 | ||
13 | const notificationId = uuidV1(); | 13 | const notificationId = uuidV1(); |
14 | 14 | ||
15 | ipcRenderer.sendToHost( | 15 | ipcRenderer.sendToHost('notification', this.onNotify({ |
16 | 'notification', | 16 | title, |
17 | this.onNotify({ | 17 | options, |
18 | title, | 18 | notificationId, |
19 | options, | 19 | })); |
20 | notificationId, | ||
21 | }), | ||
22 | ); | ||
23 | 20 | ||
24 | ipcRenderer.once(`notification-onclick:${notificationId}`, () => { | 21 | ipcRenderer.once(`notification-onclick:${notificationId}`, () => { |
25 | resolve(); | 22 | resolve(); |