summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorMatain <[email protected]>2022-06-09 17:57:12 +0800
committerMatain <[email protected]>2022-06-09 17:57:12 +0800
commitbae6fcc57477f4baf0dcf0dd073e7325045edba5 (patch)
tree2baa138e3fb86929ec28c90e7784b0b3aaffff83 /src/components
parent1ae70e1368bc5b0dc99aa92cb993721cef3fe09a (diff)
add meta version judge
Diffstat (limited to 'src/components')
-rw-r--r--src/components/proxies/ProxyGroup.tsx12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/components/proxies/ProxyGroup.tsx b/src/components/proxies/ProxyGroup.tsx
index 2b00bae..5c8fa25 100644
--- a/src/components/proxies/ProxyGroup.tsx
+++ b/src/components/proxies/ProxyGroup.tsx
@@ -73,9 +73,15 @@ function ProxyGroupImpl({
const testLatency = useCallback(async () => {
setIsTestingLatency(true);
try {
- await proxiesAPI.requestDelayForProxyGroup(apiConfig,name);
- await dispatch(fetchProxies(apiConfig));
- } catch (err) {}
+ if (version.meta==true){
+ await proxiesAPI.requestDelayForProxyGroup(apiConfig,name);
+ await dispatch(fetchProxies(apiConfig));}
+ else{
+ await proxiesAPI.requestDelayForProxy(apiConfig,all);
+ await dispatch(fetchProxies(apiConfig));
+ }
+ }
+ catch (err) {}
setIsTestingLatency(false);
}, [apiConfig, dispatch, name]);