mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-12 15:34:59 +03:00
Optimize code ,add IsGroupType extension. Adjust EConfigType
This commit is contained in:
@@ -484,7 +484,7 @@ public partial class CoreConfigV2rayService
|
||||
{
|
||||
try
|
||||
{
|
||||
if (node.ConfigType is not (EConfigType.PolicyGroup or EConfigType.ProxyChain))
|
||||
if (!node.ConfigType.IsGroupType())
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
@@ -631,7 +631,7 @@ public partial class CoreConfigV2rayService
|
||||
{
|
||||
index++;
|
||||
|
||||
if (node.ConfigType is EConfigType.PolicyGroup or EConfigType.ProxyChain)
|
||||
if (node.ConfigType.IsGroupType())
|
||||
{
|
||||
var (childProfiles, _) = await ProfileGroupItemManager.GetChildProfileItems(node.IndexId);
|
||||
if (childProfiles.Count <= 0)
|
||||
@@ -782,7 +782,7 @@ public partial class CoreConfigV2rayService
|
||||
var node = nodes[i];
|
||||
if (node == null)
|
||||
continue;
|
||||
if (node.ConfigType is EConfigType.PolicyGroup or EConfigType.ProxyChain)
|
||||
if (node.ConfigType.IsGroupType())
|
||||
{
|
||||
var (childProfiles, _) = await ProfileGroupItemManager.GetChildProfileItems(node.IndexId);
|
||||
if (childProfiles.Count <= 0)
|
||||
|
||||
Reference in New Issue
Block a user