Optimize code ,add IsGroupType extension. Adjust EConfigType

This commit is contained in:
2dust
2025-10-08 17:13:54 +08:00
parent a559586e71
commit 91af50f99a
17 changed files with 37 additions and 26 deletions
+2 -2
View File
@@ -357,7 +357,7 @@ public static class ConfigHandler
{
}
}
else if (profileItem.ConfigType > EConfigType.Group)
else if (profileItem.ConfigType.IsGroupType())
{
var profileGroupItem = await AppManager.Instance.GetProfileGroupItem(it.IndexId);
await AddGroupServerCommon(config, profileItem, profileGroupItem, true);
@@ -1255,7 +1255,7 @@ public static class ConfigHandler
if (node.ConfigType != EConfigType.Custom && coreType != ECoreType.sing_box && config.TunModeItem.EnableTun)
{
var tun2SocksAddress = node.Address;
if (node.ConfigType > EConfigType.Group)
if (node.ConfigType.IsGroupType())
{
var lstAddresses = (await ProfileGroupItemManager.GetAllChildDomainAddresses(node.IndexId)).ToList();
if (lstAddresses.Count > 0)