From 2b1846d72c61fe445ebacc6048a1a956fd5885ff Mon Sep 17 00:00:00 2001 From: pompurin404 Date: Sun, 8 Sep 2024 11:56:06 +0800 Subject: [PATCH] allow hidden for GLOBAL group --- src/main/core/mihomoApi.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/core/mihomoApi.ts b/src/main/core/mihomoApi.ts index c3dc3a2..17ff21b 100644 --- a/src/main/core/mihomoApi.ts +++ b/src/main/core/mihomoApi.ts @@ -94,8 +94,10 @@ export const mihomoGroups = async (): Promise => { }) if (!groups.find((group) => group.name === 'GLOBAL')) { const newGlobal = proxies.proxies['GLOBAL'] as IMihomoGroup - const newAll = newGlobal.all.map((name) => proxies.proxies[name]) - groups.push({ ...newGlobal, all: newAll }) + if (!newGlobal.hidden) { + const newAll = newGlobal.all.map((name) => proxies.proxies[name]) + groups.push({ ...newGlobal, all: newAll }) + } } return groups }