fix: resolve merge conflict and stabilize core/control flows

This commit is contained in:
xmk23333 2026-01-19 00:37:15 +08:00
parent 0cc1d238c9
commit 56e328191f
3 changed files with 5 additions and 3 deletions

View File

@ -7,5 +7,6 @@
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
},
"terminal.integrated.defaultProfile.windows": "PowerShell"
}

View File

@ -48,8 +48,8 @@ export async function addOverrideItem(item: Partial<IOverrideItem>): Promise<voi
await updateOverrideItem(newItem)
} else {
config.items.push(newItem)
await setOverrideConfig(config)
}
await setOverrideConfig(config)
}
export async function removeOverrideItem(id: string): Promise<void> {

View File

@ -76,6 +76,7 @@ async function createFloatingWindow(): Promise<void> {
})
// IPC 监听器
ipcMain.removeAllListeners('updateFloatingWindow')
ipcMain.on('updateFloatingWindow', () => {
if (floatingWindow) {
floatingWindow.webContents.send('controledMihomoConfigUpdated')
@ -130,8 +131,8 @@ export async function triggerFloatingWindow(): Promise<void> {
export async function closeFloatingWindow(): Promise<void> {
if (floatingWindow) {
ipcMain.removeAllListeners('updateFloatingWindow')
floatingWindow.close()
floatingWindow.destroy()
floatingWindow = null
}
await showTrayIcon()