From 20574717c4b54635a8b757fccce64f2a98614997 Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Wed, 29 Sep 2021 08:33:01 +0200 Subject: chore: update various outdated node_modules (#1969) --- src/webview/notifications.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'src/webview') diff --git a/src/webview/notifications.js b/src/webview/notifications.js index 205a3220c..22960d818 100644 --- a/src/webview/notifications.js +++ b/src/webview/notifications.js @@ -1,22 +1,26 @@ import { ipcRenderer } from 'electron'; -import uuidV1 from 'uuid/v1'; + +import { v1 as uuidV1 } from 'uuid'; const debug = require('debug')('Ferdi:Notifications'); export class NotificationsHandler { - onNotify = (data) => data; + onNotify = data => data; displayNotification(title, options) { - return new Promise((resolve) => { + return new Promise(resolve => { debug('New notification', title, options); const notificationId = uuidV1(); - ipcRenderer.sendToHost('notification', this.onNotify({ - title, - options, - notificationId, - })); + ipcRenderer.sendToHost( + 'notification', + this.onNotify({ + title, + options, + notificationId, + }), + ); ipcRenderer.once(`notification-onclick:${notificationId}`, () => { resolve(); -- cgit v1.2.3-70-g09d2