From 56e328191fa09199c1bde916bf315623a95fe698 Mon Sep 17 00:00:00 2001 From: xmk23333 Date: Mon, 19 Jan 2026 00:37:15 +0800 Subject: [PATCH] fix: resolve merge conflict and stabilize core/control flows --- .vscode/settings.json | 3 ++- src/main/config/override.ts | 2 +- src/main/resolve/floatingWindow.ts | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 4c05394..e63659c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,5 +7,6 @@ }, "[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" - } + }, + "terminal.integrated.defaultProfile.windows": "PowerShell" } diff --git a/src/main/config/override.ts b/src/main/config/override.ts index e45bb32..962315a 100644 --- a/src/main/config/override.ts +++ b/src/main/config/override.ts @@ -48,8 +48,8 @@ export async function addOverrideItem(item: Partial): Promise { diff --git a/src/main/resolve/floatingWindow.ts b/src/main/resolve/floatingWindow.ts index aaa04d6..74ca7c2 100644 --- a/src/main/resolve/floatingWindow.ts +++ b/src/main/resolve/floatingWindow.ts @@ -76,6 +76,7 @@ async function createFloatingWindow(): Promise { }) // IPC 监听器 + ipcMain.removeAllListeners('updateFloatingWindow') ipcMain.on('updateFloatingWindow', () => { if (floatingWindow) { floatingWindow.webContents.send('controledMihomoConfigUpdated') @@ -130,8 +131,8 @@ export async function triggerFloatingWindow(): Promise { export async function closeFloatingWindow(): Promise { if (floatingWindow) { + ipcMain.removeAllListeners('updateFloatingWindow') floatingWindow.close() - floatingWindow.destroy() floatingWindow = null } await showTrayIcon()