Make app actually quit for update

Before, it was just minimizing and the app wouldn't even update because
electron-updater expects to be able to close the app.
This commit is contained in:
Alex Liebowitz 2017-12-10 03:01:24 -05:00
parent 24ced8ede7
commit 565f411986

View file

@ -436,6 +436,9 @@ app.on('before-quit', event => {
shutdownDaemonAndQuit();
} else {
console.log('Quitting.');
if (autoUpdating) {
minimize = false;
}
}
});
@ -522,6 +525,11 @@ ipcMain.on('version-info-requested', () => {
});
});
ipcMain.on('autoUpdate', () => {
minimize = false;
autoUpdater.quitAndInstall();
});
ipcMain.on('get-auth-token', event => {
Keytar.getPassword('LBRY', 'auth_token').then(token => {
event.sender.send('auth-token-response', token ? token.toString().trim() : null);