Electron-181 - Removed the unwanted closeAll function which was throwing an error

This commit is contained in:
Kiran Niranjan
2017-10-25 13:30:46 +05:30
committed by Kiran Niranjan
parent d1257ff091
commit 89767363c5

View File

@@ -171,7 +171,7 @@ function setup() {
setupConfig(); setupConfig();
// if display added/removed/changed then re-run setup and remove all existing // 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-added', setupConfig);
electron.screen.on('display-removed', setupConfig); electron.screen.on('display-removed', setupConfig);
electron.screen.on('display-metrics-changed', setupConfig); electron.screen.on('display-metrics-changed', setupConfig);
@@ -238,7 +238,6 @@ function calcDimensions() {
* Setup the notification config * Setup the notification config
*/ */
function setupConfig() { function setupConfig() {
closeAll();
// This feature only applies to windows // This feature only applies to windows
if (!isMac) { 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. * Once a minute, remove inactive windows to free up memory used.
*/ */