mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2026-02-10 11:40:28 +08:00
fix: resolve merge conflict and stabilize core/control flows
This commit is contained in:
parent
0cc1d238c9
commit
56e328191f
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -7,5 +7,6 @@
|
||||
},
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
}
|
||||
},
|
||||
"terminal.integrated.defaultProfile.windows": "PowerShell"
|
||||
}
|
||||
|
||||
@ -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> {
|
||||
|
||||
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user