fix: provider proxy sort by delay

This commit is contained in:
GyDi committed 2022-11-11 01:21:23 +08:00
1 parent 515c07ea2b
commit 97dfa18b9b
3 files changed
+15 -14

No files matched your search

+1 -11
View File
@@ -59,17 +59,7 @@ const ProxyItem = (props: Props) => {
useEffect(() => {
if (!proxy) return;
if (!proxy.provider) {
setDelay(delayManager.getDelay(proxy.name, groupName));
return;
}
const { history = [] } = proxy;
if (history.length > 0) {
// 0ms以error显示
setDelay(history[history.length - 1].delay || 1e6);
}
setDelay(delayManager.getDelayFix(proxy, groupName));
}, [proxy]);
const onDelay = useLockFn(async () => {