Merge pull request #93 from vector-im/t3chguy/flush-on-update

Run before-quit on updates too to flush rageshake
This commit is contained in:
Michael Telatynski 2020-05-26 11:58:22 +01:00 committed by GitHub
commit be30a2fbab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -790,12 +790,15 @@ app.on('activate', () => {
mainWindow.show();
});
app.on('before-quit', () => {
function beforeQuit() {
global.appQuitting = true;
if (mainWindow) {
mainWindow.webContents.send('before-quit');
}
});
}
app.on('before-quit', beforeQuit);
app.on('before-quit-for-update', beforeQuit);
app.on('second-instance', (ev, commandLine, workingDirectory) => {
// If other instance launched with --hidden then skip showing window