mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-19 18:32:10 +08:00
refactor: optimize swr data refresh paths
This commit is contained in:
@@ -6,8 +6,7 @@ import {
|
||||
patchProfile,
|
||||
patchProfilesConfig,
|
||||
} from '@/services/cmds'
|
||||
import { useQuery } from '@/services/query-client'
|
||||
import { queryClient } from '@/services/query-client'
|
||||
import { setCacheData, useQuery } from '@/services/query-client'
|
||||
import { debugLog } from '@/utils/debug'
|
||||
|
||||
export const useProfiles = () => {
|
||||
@@ -201,7 +200,7 @@ export const useProfiles = () => {
|
||||
await patchProfile(current.uid, { selected: newSelected })
|
||||
debugLog('[ActivateSelected] 代理选择配置保存成功')
|
||||
|
||||
queryClient.setQueryData(['getProxies'], await calcuProxies())
|
||||
setCacheData(['getProxies'], await calcuProxies())
|
||||
} catch (error: unknown) {
|
||||
console.error(
|
||||
'[ActivateSelected] 保存代理选择配置失败:',
|
||||
|
||||
Reference in New Issue
Block a user