mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-10-30 18:52:12 +08:00
fix: preserve custom TUN fields and sync service provider caches
Limit GUI authority to saved TUN fields while preserving custom overrides. Sync provider caches after service startup, reloads and updates. Publish copies atomically with session, runtime and cache metadata checks.
This commit is contained in:
@@ -23,6 +23,7 @@ import { useTranslation } from 'react-i18next'
|
||||
import { updateProxyProvider } from 'tauri-plugin-mihomo-api'
|
||||
|
||||
import { useAppRefreshers, useProxiesData } from '@/providers/app-data-context'
|
||||
import { syncRuntimeProviders } from '@/services/cmds'
|
||||
import { showNotice } from '@/services/notice-service'
|
||||
import parseTraffic from '@/utils/parse-traffic'
|
||||
|
||||
@@ -59,6 +60,7 @@ export const ProviderButton = () => {
|
||||
await updateProxyProvider(name)
|
||||
|
||||
await refreshProxy()
|
||||
void syncRuntimeProviders()
|
||||
|
||||
showNotice.success(
|
||||
'proxies.feedback.notifications.provider.updateSuccess',
|
||||
@@ -103,6 +105,7 @@ export const ProviderButton = () => {
|
||||
}
|
||||
|
||||
await refreshProxy()
|
||||
void syncRuntimeProviders()
|
||||
|
||||
showNotice.success('proxies.feedback.notifications.provider.allUpdated')
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user