mirror of
https://github.com/2dust/v2rayN.git
synced 2025-10-13 11:59:13 +00:00
Compare commits
4 commits
a6f2b47952
...
466cf53d35
Author | SHA1 | Date | |
---|---|---|---|
![]() |
466cf53d35 | ||
![]() |
9c58fec8d4 | ||
![]() |
11343a30fd | ||
![]() |
3693a7fee6 |
2 changed files with 27 additions and 17 deletions
|
@ -1,7 +1,7 @@
|
|||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>7.15.0</Version>
|
||||
<Version>7.15.1</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -186,27 +186,37 @@ public class ProfileGroupItemManager
|
|||
visited.Add(indexId);
|
||||
stack.Add(indexId);
|
||||
|
||||
Instance.TryGet(indexId, out var groupItem);
|
||||
|
||||
if (groupItem == null || groupItem.ChildItems.IsNullOrEmpty())
|
||||
try
|
||||
{
|
||||
Instance.TryGet(indexId, out var groupItem);
|
||||
|
||||
if (groupItem == null || groupItem.ChildItems.IsNullOrEmpty())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var childIds = Utils.String2List(groupItem.ChildItems)
|
||||
.Where(p => !string.IsNullOrEmpty(p))
|
||||
.ToList();
|
||||
if (childIds == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach (var child in childIds)
|
||||
{
|
||||
if (HasCycle(child, visited, stack))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
var childIds = Utils.String2List(groupItem.ChildItems)
|
||||
.Where(p => !string.IsNullOrEmpty(p))
|
||||
.ToList();
|
||||
|
||||
foreach (var child in childIds)
|
||||
finally
|
||||
{
|
||||
if (HasCycle(child, visited, stack))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
stack.Remove(indexId);
|
||||
}
|
||||
|
||||
stack.Remove(indexId);
|
||||
return false;
|
||||
}
|
||||
|
||||
public static async Task<(List<ProfileItem> Items, ProfileGroupItem? Group)> GetChildProfileItems(string? indexId)
|
||||
|
|
Loading…
Reference in a new issue