mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
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
|
app.on("open-url", async (event, url) => { // for macOS
|
||||||
if (url.startsWith("siyuan://")) {
|
if (url.startsWith("siyuan://")) {
|
||||||
|
let isBackground = true;
|
||||||
if (workspaces.length === 0) {
|
if (workspaces.length === 0) {
|
||||||
|
isBackground = false;
|
||||||
let index = 0;
|
let index = 0;
|
||||||
while (index < 10) {
|
while (index < 10) {
|
||||||
index++;
|
index++;
|
||||||
|
|
@ -1212,6 +1214,9 @@ app.on("open-url", async (event, url) => { // for macOS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!isBackground) {
|
||||||
|
await sleep(1500);
|
||||||
|
}
|
||||||
workspaces.forEach(item => {
|
workspaces.forEach(item => {
|
||||||
if (item.browserWindow && !item.browserWindow.isDestroyed()) {
|
if (item.browserWindow && !item.browserWindow.isDestroyed()) {
|
||||||
item.browserWindow.webContents.send("siyuan-open-url", url);
|
item.browserWindow.webContents.send("siyuan-open-url", url);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue