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