mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-07 21:47:02 +09:00
style: add semicolons after closing braces in window focus logic (JS-4052)
This commit is contained in:
parent
74fad999d6
commit
d450324351
1 changed files with 17 additions and 3 deletions
20
electron.js
20
electron.js
|
@ -233,9 +233,14 @@ app.on('second-instance', (event, argv) => {
|
|||
if (mainWindow.isMinimized()) {
|
||||
mainWindow.restore();
|
||||
};
|
||||
|
||||
mainWindow.show();
|
||||
if (!mainWindow.isVisible()) {
|
||||
mainWindow.show();
|
||||
};
|
||||
mainWindow.focus();
|
||||
// Ensure focus is properly stolen on macOS
|
||||
if (is.macos) {
|
||||
app.focus({ steal: true });
|
||||
};
|
||||
});
|
||||
|
||||
app.on('before-quit', e => {
|
||||
|
@ -260,6 +265,15 @@ app.on('open-url', (e, url) => {
|
|||
|
||||
if (mainWindow) {
|
||||
Util.send(mainWindow, 'route', Util.getRouteFromUrl(url));
|
||||
mainWindow.show();
|
||||
if (mainWindow.isMinimized()) {
|
||||
mainWindow.restore();
|
||||
};
|
||||
if (!mainWindow.isVisible()) {
|
||||
mainWindow.show();
|
||||
};
|
||||
mainWindow.focus();
|
||||
if (is.macos) {
|
||||
app.focus({ steal: true });
|
||||
};
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue