mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-28 07:14:40 +08:00
fix(app-data-provider): dashboard state sync
This commit is contained in:
@@ -138,10 +138,15 @@ export const AppDataProvider = ({
|
||||
if (now - lastUpdateTime <= refreshThrottle) return;
|
||||
|
||||
lastUpdateTime = now;
|
||||
scheduleTimeout(() => {
|
||||
refreshProxy().catch((error) =>
|
||||
console.error("[DataProvider] Proxy refresh failed:", error),
|
||||
);
|
||||
scheduleTimeout(async () => {
|
||||
await Promise.all([
|
||||
refreshProxy().catch((error) =>
|
||||
console.error("[DataProvider] Proxy refresh failed:", error),
|
||||
),
|
||||
refreshClashConfig().catch((error) =>
|
||||
console.error("[DataProvider] Clash config refresh failed:", error),
|
||||
),
|
||||
]);
|
||||
}, 200);
|
||||
};
|
||||
|
||||
@@ -220,7 +225,7 @@ export const AppDataProvider = ({
|
||||
);
|
||||
}
|
||||
};
|
||||
}, [refreshProxy, refreshRules, refreshRuleProviders]);
|
||||
}, [refreshProxy, refreshClashConfig, refreshRules, refreshRuleProviders]);
|
||||
|
||||
const { data: sysproxy, mutate: refreshSysproxy } = useSWR(
|
||||
"getSystemProxy",
|
||||
|
||||
Reference in New Issue
Block a user