mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-08 05:57:02 +09:00
fix second instance focus
This commit is contained in:
parent
843117e30c
commit
0b65f8a3ab
1 changed files with 11 additions and 11 deletions
22
electron.js
22
electron.js
|
@ -163,18 +163,18 @@ app.on('second-instance', (event, argv) => {
|
|||
deeplinkingUrl = argv.find((arg) => arg.startsWith(`${protocol}://`));
|
||||
};
|
||||
|
||||
if (mainWindow) {
|
||||
if (deeplinkingUrl) {
|
||||
Util.send(mainWindow, 'route', Util.getRouteFromUrl(deeplinkingUrl));
|
||||
};
|
||||
|
||||
if (mainWindow.isMinimized()) {
|
||||
mainWindow.restore();
|
||||
};
|
||||
|
||||
mainWindow.show();
|
||||
mainWindow.focus();
|
||||
if (!mainWindow || !deeplinkingUrl) {
|
||||
return;
|
||||
};
|
||||
|
||||
Util.send(mainWindow, 'route', Util.getRouteFromUrl(deeplinkingUrl));
|
||||
|
||||
if (mainWindow.isMinimized()) {
|
||||
mainWindow.restore();
|
||||
};
|
||||
|
||||
mainWindow.show();
|
||||
mainWindow.focus();
|
||||
});
|
||||
|
||||
app.on('before-quit', (e) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue