소스 검색

:art: ipcRenderer.send(Constants.SIYUAN_CMD, "minimize");

Vanessa 1 년 전
부모
커밋
cf091e777f
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      app/src/boot/onGetConfig.ts

+ 5 - 1
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