From f84c4d95b367c14f2007f8543b04e456c2bc4755 Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Thu, 17 Oct 2024 17:40:54 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E5=87=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 2 -- src/App.tsx | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index f897ef8..5054c0f 100644 --- a/main.js +++ b/main.js @@ -101,8 +101,6 @@ function createTray() { quit() } else { await mainWindow.webContents.send('quitAndInstall'); - mainWindow.show() - mainWindow.focus() } }, // icon: iconPath, diff --git a/src/App.tsx b/src/App.tsx index 5a2944b..30c7c87 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -104,7 +104,11 @@ const App: React.FC = () => { storage.setItem('setting', JSON.stringify(setting)) }) window.electron.quitAndInstall(async (_e: any) => { - storage.setItem('quitMeeting', true) + let bool = await window.electron.isVisible() + if (bool) { + storage.setItem('quitMeeting', true) + window.electron.setViewStatus('show') + } }) window.electron.isOpenWindows(async (_e: any) => { let bool = await window.electron.isVisible()