修正错误逻辑

修正算法
This commit is contained in:
einsitang 2024-09-05 01:07:06 +08:00
parent 56edc1deaf
commit c9daafd5f7

View File

@ -79,13 +79,16 @@ export const useRenderList = (mode: string) => {
if (hiddenInvalidNetwork) {
let proxys = group.all.filter((item) => {
if (item.all) {
return false;
return true;
}
if (item.history) {
const history = item.history;
let min = Math.min(3, history.length);
let recentHistory = history.slice(0, min);
let recentHistory = history.slice(
history.length - min,
history.length
);
let hasInvalidNetwork =
recentHistory.filter((item) => item.delay == 0).length > 0;
if (hasInvalidNetwork) {