mirror of
https://github.com/2dust/v2rayN.git
synced 2025-10-13 20:09:12 +00:00
Compare commits
31 commits
6c1ace9b35
...
fd08b1ffd9
Author | SHA1 | Date | |
---|---|---|---|
![]() |
fd08b1ffd9 | ||
![]() |
a6f2b47952 | ||
![]() |
07af03ab81 | ||
![]() |
8f45d9730b | ||
![]() |
33f5d20022 | ||
![]() |
e2df1bc6cb | ||
![]() |
ef09be7a26 | ||
![]() |
142940118e | ||
![]() |
f64f72ba7f | ||
![]() |
f3adb57e68 | ||
![]() |
ca80e1e831 | ||
![]() |
901f8101f0 | ||
![]() |
587686ffce | ||
![]() |
aab6d3d136 | ||
![]() |
cb814e1dac | ||
![]() |
8a707cfb90 | ||
![]() |
4a37b53fe1 | ||
![]() |
ff6ce3334a | ||
![]() |
c00b0b7c43 | ||
![]() |
c767e8f085 | ||
![]() |
e7b07f735d | ||
![]() |
3d8559d06d | ||
![]() |
c98566f270 | ||
![]() |
6f84515f1a | ||
![]() |
637137303a | ||
![]() |
764a2dc301 | ||
![]() |
f4805a399b | ||
![]() |
9202390fa1 | ||
![]() |
d074d9a72a | ||
![]() |
dd2bfd9511 | ||
![]() |
55de37e5f3 |
1 changed files with 16 additions and 26 deletions
|
@ -186,37 +186,27 @@ public class ProfileGroupItemManager
|
|||
visited.Add(indexId);
|
||||
stack.Add(indexId);
|
||||
|
||||
try
|
||||
Instance.TryGet(indexId, out var groupItem);
|
||||
|
||||
if (groupItem == null || groupItem.ChildItems.IsNullOrEmpty())
|
||||
{
|
||||
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;
|
||||
}
|
||||
finally
|
||||
|
||||
var childIds = Utils.String2List(groupItem.ChildItems)
|
||||
.Where(p => !string.IsNullOrEmpty(p))
|
||||
.ToList();
|
||||
|
||||
foreach (var child in childIds)
|
||||
{
|
||||
stack.Remove(indexId);
|
||||
if (HasCycle(child, visited, stack))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
stack.Remove(indexId);
|
||||
return false;
|
||||
}
|
||||
|
||||
public static async Task<(List<ProfileItem> Items, ProfileGroupItem? Group)> GetChildProfileItems(string? indexId)
|
||||
|
|
Loading…
Reference in a new issue