From cf091e777f7f03b31e12e43f024deefe055b945b Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 28 Apr 2024 09:51:50 +0800 Subject: [PATCH] :art: ipcRenderer.send(Constants.SIYUAN_CMD, "minimize"); --- app/src/boot/onGetConfig.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/boot/onGetConfig.ts b/app/src/boot/onGetConfig.ts index a746e8240..ec296b9d3 100644 --- a/app/src/boot/onGetConfig.ts +++ b/app/src/boot/onGetConfig.ts @@ -197,7 +197,11 @@ export const initWindow = async (app: App) => { }); }; - ipcRenderer.send(Constants.SIYUAN_EVENT, "onEvent"); + if (window.siyuan.config.system.autoLaunch2 === 2) { + ipcRenderer.send(Constants.SIYUAN_CMD, "minimize"); + } + + ipcRenderer.send(Constants.SIYUAN_EVENT); ipcRenderer.on(Constants.SIYUAN_EVENT, (event, cmd) => { if (cmd === "focus") { // 由于 https://github.com/siyuan-note/siyuan/issues/10060 和新版 electron 应用切出再切进会保持光标,故移除 focus