From 89767363c581beba605c1fba8b34b787cd89b088 Mon Sep 17 00:00:00 2001 From: Kiran Niranjan Date: Wed, 25 Oct 2017 13:30:46 +0530 Subject: [PATCH] Electron-181 - Removed the unwanted closeAll function which was throwing an error --- js/notify/electron-notify.js | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/js/notify/electron-notify.js b/js/notify/electron-notify.js index 8103ad14..82c6303e 100644 --- a/js/notify/electron-notify.js +++ b/js/notify/electron-notify.js @@ -171,7 +171,7 @@ function setup() { setupConfig(); // if display added/removed/changed then re-run setup and remove all existing - // notifications. ToDo: should reposition notifications rather than closing. + // notifications. electron.screen.on('display-added', setupConfig); electron.screen.on('display-removed', setupConfig); electron.screen.on('display-metrics-changed', setupConfig); @@ -238,7 +238,6 @@ function calcDimensions() { * Setup the notification config */ function setupConfig() { - closeAll(); // This feature only applies to windows if (!isMac) { @@ -694,33 +693,6 @@ function getWindow() { }) } -/** - * Closes all the notifications and windows - */ -function closeAll() { - // Clear out animation Queue and close windows - animationQueue.clear(); - - activeNotifications.forEach(function(window) { - if (window.displayTimer) { - clearTimeout(window.displayTimer); - } - if (window.electronNotifyOnCloseFunc) { - // ToDo: fix this: shouldn't delete method on arg - /* eslint-disable */ - delete window.electronNotifyOnCloseFunc; - /* eslint-enable */ - } - window.close(); - }); - - cleanUpInactiveWindow(); - - // Reset certain vars - nextInsertPos = {}; - activeNotifications = []; -} - /** * Once a minute, remove inactive windows to free up memory used. */