mirror of
https://github.com/2dust/v2rayN.git
synced 2026-01-15 10:29:33 +00:00
Refactor child item aggregation in managers
Some checks failed
release Linux / build (Release) (push) Has been cancelled
release macOS / build (Release) (push) Has been cancelled
release Windows desktop (Avalonia UI) / build (Release) (push) Has been cancelled
release Windows / build (Release) (push) Has been cancelled
release Linux / rpm (push) Has been cancelled
Some checks failed
release Linux / build (Release) (push) Has been cancelled
release macOS / build (Release) (push) Has been cancelled
release Windows desktop (Avalonia UI) / build (Release) (push) Has been cancelled
release Windows / build (Release) (push) Has been cancelled
release Linux / rpm (push) Has been cancelled
This commit is contained in:
parent
947c84cf10
commit
fe183798b6
2 changed files with 6 additions and 4 deletions
|
|
@ -214,9 +214,10 @@ public class ActionPrecheckManager
|
||||||
return errors;
|
return errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
var childIds = Utils.String2List(group.ChildItems) ?? [];
|
var childIds = new List<string>();
|
||||||
var subItems = await ProfileGroupItemManager.GetSubChildProfileItems(group);
|
var subItems = await ProfileGroupItemManager.GetSubChildProfileItems(group);
|
||||||
childIds.AddRange(subItems.Select(p => p.IndexId));
|
childIds.AddRange(subItems.Select(p => p.IndexId));
|
||||||
|
childIds.AddRange(Utils.String2List(group.ChildItems));
|
||||||
|
|
||||||
foreach (var child in childIds)
|
foreach (var child in childIds)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -230,9 +230,10 @@ public class ProfileGroupItemManager
|
||||||
{
|
{
|
||||||
return (new List<ProfileItem>(), profileGroupItem);
|
return (new List<ProfileItem>(), profileGroupItem);
|
||||||
}
|
}
|
||||||
var items = await GetChildProfileItems(profileGroupItem);
|
|
||||||
var subItems = await GetSubChildProfileItems(profileGroupItem);
|
var items = new List<ProfileItem>();
|
||||||
items.AddRange(subItems);
|
items.AddRange(await GetSubChildProfileItems(profileGroupItem));
|
||||||
|
items.AddRange(await GetChildProfileItems(profileGroupItem));
|
||||||
|
|
||||||
return (items, profileGroupItem);
|
return (items, profileGroupItem);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue