fix first instance not showing when opening 2nd (#296)

Co-authored-by: octopushugger <octopushugger@github.com>
This commit is contained in:
Octopus Hugger 2022-12-12 06:54:56 -08:00 committed by GitHub
parent e7814c1522
commit 5bcbbacee1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -6,7 +6,7 @@ const unstrictCSP = () => {
electron.session.defaultSession.webRequest.onHeadersReceived(({responseHeaders}, done) => { electron.session.defaultSession.webRequest.onHeadersReceived(({responseHeaders}, done) => {
delete responseHeaders!["content-security-policy"]; delete responseHeaders!["content-security-policy"];
done({ responseHeaders }); done({responseHeaders});
}); });
}; };

View file

@ -83,6 +83,7 @@ async function doAfterDefiningTheWindow() {
// Someone tried to run a second instance, we should focus our window. // Someone tried to run a second instance, we should focus our window.
if (mainWindow) { if (mainWindow) {
if (mainWindow.isMinimized()) mainWindow.restore(); if (mainWindow.isMinimized()) mainWindow.restore();
mainWindow.show();
mainWindow.focus(); mainWindow.focus();
} }
}); });