This commit is contained in:
parent
86e3829d80
commit
3b339656c9
1 changed files with 5 additions and 0 deletions
|
@ -1202,7 +1202,9 @@ app.whenReady().then(() => {
|
|||
|
||||
app.on("open-url", async (event, url) => { // for macOS
|
||||
if (url.startsWith("siyuan://")) {
|
||||
let isBackground = true;
|
||||
if (workspaces.length === 0) {
|
||||
isBackground = false;
|
||||
let index = 0;
|
||||
while (index < 10) {
|
||||
index++;
|
||||
|
@ -1212,6 +1214,9 @@ app.on("open-url", async (event, url) => { // for macOS
|
|||
}
|
||||
}
|
||||
}
|
||||
if (!isBackground) {
|
||||
await sleep(1500);
|
||||
}
|
||||
workspaces.forEach(item => {
|
||||
if (item.browserWindow && !item.browserWindow.isDestroyed()) {
|
||||
item.browserWindow.webContents.send("siyuan-open-url", url);
|
||||
|
|
Loading…
Add table
Reference in a new issue