Browse Source

Fixed bug on macOS when restart app on new version

The app stays open and this confuse the user.
pull/2255/head 0.6.7
Ramiro Saenz 6 years ago
parent
commit
c725d1984b
  1. 6
      electron/updater.js

6
electron/updater.js

@ -12,7 +12,11 @@ const initialize = (window) => {
const send = webContents.send.bind(window.webContents);
autoUpdater.on('checking-for-update', (event) => send('autoUpdater:checking-for-update'));
autoUpdater.on('update-downloaded', (...args) => send('autoUpdater:update-downloaded', ...args));
ipcMain.on('autoUpdater:quit-and-install', (event) => autoUpdater.quitAndInstall());
ipcMain.on('autoUpdater:quit-and-install', (event) => {
app.removeAllListeners('window-all-closed');
BrowserWindow.getAllWindows().forEach((browserWindow) => browserWindow.removeAllListeners('close'));
autoUpdater.quitAndInstall()
});
ipcMain.on('autoUpdater:check-for-updates', (event) => autoUpdater.checkForUpdates());
};

Loading…
Cancel
Save