From bae6fcc57477f4baf0dcf0dd073e7325045edba5 Mon Sep 17 00:00:00 2001 From: Matain Date: Thu, 9 Jun 2022 17:57:12 +0800 Subject: add meta version judge --- src/components/proxies/ProxyGroup.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/components') 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]); -- cgit v1.3.1