refactor: frontend (#7097)

* refactor: remove unused window show/hide event listeners

* refactor: deduplicate profile-changed event handling

* refactor: remove unused setupCloseListener from use-listen

* refactor: remove unused removeAllListeners from use-listen

* fix(backend): dedupe profile changed notification on import

* fix: avoid duplicate timer update completed event

* refactor(frontend): simplify proxy switch fallback path
This commit is contained in:
Tunglies
2026-05-23 12:52:52 +08:00
committed by GitHub
parent d3bb018ab7
commit c18c23963d
8 changed files with 9 additions and 138 deletions
+2
View File
@@ -15,6 +15,7 @@ import {
getRunningMode,
getSystemProxy,
} from '@/services/cmds'
import { queryClient } from '@/services/query-client'
import {
ClashConfigContext,
@@ -137,6 +138,7 @@ export const AppDataProvider = ({
}
lastProfileId = newProfileId
lastUpdateTime = now
void queryClient.invalidateQueries({ queryKey: ['getProfiles'] })
refreshRules().catch(() => {})
refreshRuleProviders().catch(() => {})
}