mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-28 09:51:06 -06:00
Electron-104 - Optimized async dependency in electron-notify
This commit is contained in:
parent
3b46d2e76d
commit
2e943359bb
@ -10,8 +10,9 @@
|
|||||||
//
|
//
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const async = require('async');
|
|
||||||
const electron = require('electron');
|
const electron = require('electron');
|
||||||
|
const asyncMap = require('async.map');
|
||||||
|
const asyncMapSeries = require('async.mapseries');
|
||||||
const app = electron.app;
|
const app = electron.app;
|
||||||
const BrowserWindow = electron.BrowserWindow;
|
const BrowserWindow = electron.BrowserWindow;
|
||||||
const ipc = electron.ipcMain;
|
const ipc = electron.ipcMain;
|
||||||
@ -541,9 +542,9 @@ function moveOneDown(startPos) {
|
|||||||
notificationPosArray.push(i)
|
notificationPosArray.push(i)
|
||||||
}
|
}
|
||||||
// Start to animate all notifications at once or in parallel
|
// Start to animate all notifications at once or in parallel
|
||||||
let asyncFunc = async.map // Best performance
|
let asyncFunc = asyncMap // Best performance
|
||||||
if (config.animateInParallel === false) {
|
if (config.animateInParallel === false) {
|
||||||
asyncFunc = async.mapSeries // Sluggish
|
asyncFunc = asyncMapSeries // Sluggish
|
||||||
}
|
}
|
||||||
asyncFunc(notificationPosArray, moveNotificationAnimation, function() {
|
asyncFunc(notificationPosArray, moveNotificationAnimation, function() {
|
||||||
resolve()
|
resolve()
|
||||||
|
11
package.json
11
package.json
@ -87,15 +87,16 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@paulcbetts/system-idle-time": "^1.0.4",
|
"@paulcbetts/system-idle-time": "^1.0.4",
|
||||||
"async": "^2.1.5",
|
"appdirectory": "^0.1.0",
|
||||||
|
"async.map": "^0.5.2",
|
||||||
|
"async.mapseries": "^0.5.2",
|
||||||
"auto-launch": "^5.0.1",
|
"auto-launch": "^5.0.1",
|
||||||
"electron-context-menu": "^0.8.0",
|
"electron-context-menu": "^0.8.0",
|
||||||
"electron-squirrel-startup": "^1.0.0",
|
|
||||||
"keymirror": "0.1.1",
|
|
||||||
"winreg": "^1.2.3",
|
|
||||||
"electron-dl": "^1.9.0",
|
"electron-dl": "^1.9.0",
|
||||||
|
"electron-squirrel-startup": "^1.0.0",
|
||||||
"filesize": "^3.5.10",
|
"filesize": "^3.5.10",
|
||||||
"appdirectory": "^0.1.0"
|
"keymirror": "0.1.1",
|
||||||
|
"winreg": "^1.2.3"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"screen-snippet": "git+https://github.com/symphonyoss/ScreenSnippet.git#v1.0.1"
|
"screen-snippet": "git+https://github.com/symphonyoss/ScreenSnippet.git#v1.0.1"
|
||||||
|
Loading…
Reference in New Issue
Block a user