mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-20 19:12:09 +08:00
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:
@@ -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(() => {})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user