Vanessa 2024-04-10 16:45:55 +08:00
parent 86e3829d80
commit 3b339656c9

View file

@ -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);