diff options
| author | Matain <[email protected]> | 2022-06-09 17:57:12 +0800 |
|---|---|---|
| committer | Matain <[email protected]> | 2022-06-09 17:57:12 +0800 |
| commit | bae6fcc57477f4baf0dcf0dd073e7325045edba5 (patch) | |
| tree | 2baa138e3fb86929ec28c90e7784b0b3aaffff83 /src/components | |
| parent | 1ae70e1368bc5b0dc99aa92cb993721cef3fe09a (diff) | |
add meta version judge
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/proxies/ProxyGroup.tsx | 12 |
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]); |
