diff options
| author | Andrej Mihajlov <and@codeispoetry.ru> | 2017-03-17 13:00:07 +0000 |
|---|---|---|
| committer | Andrej Mihajlov <and@codeispoetry.ru> | 2017-03-17 13:00:07 +0000 |
| commit | ecdc49cc5866631aef05c5ffab91e46ff907bc36 (patch) | |
| tree | 7e01663f6489fbc2c89315f846012e2d6b97b647 /app/main.js | |
| parent | 3f44c0681bf6786a3fe6b6a0ded129028c8d1f7d (diff) | |
| download | mullvadvpn-ecdc49cc5866631aef05c5ffab91e46ff907bc36.tar.xz mullvadvpn-ecdc49cc5866631aef05c5ffab91e46ff907bc36.zip | |
Update tray assets and hide spinner when window is visible
Diffstat (limited to 'app/main.js')
| -rw-r--r-- | app/main.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/main.js b/app/main.js index 9d91621949..67a580bf08 100644 --- a/app/main.js +++ b/app/main.js @@ -32,10 +32,12 @@ const stopTrayEventMonitor = () => { } }; -ipcMain.on('changeTrayIcon', (event, type) => { - trayIconManager.iconType = type; +ipcMain.on('changeTrayIcon', (event, data) => { + trayIconManager.updateIconType(data.type, data.skipAnimation); }); +ipcMain.emit(); + // hide dock icon if(process.platform === 'darwin') { app.dock.hide(); @@ -130,10 +132,12 @@ const createWindow = () => { window.on('show', () => { startTrayEventMonitor(window); + window.webContents.send('showWindow'); }); window.on('hide', () => { stopTrayEventMonitor(); + window.webContents.send('hideWindow'); }); }; |
