mirror of
https://github.com/2dust/v2rayN.git
synced 2026-01-25 12:09:40 +05:00
Refactor child item aggregation in managers
This commit is contained in:
@@ -214,9 +214,10 @@ public class ActionPrecheckManager
|
||||
return errors;
|
||||
}
|
||||
|
||||
var childIds = Utils.String2List(group.ChildItems) ?? [];
|
||||
var childIds = new List<string>();
|
||||
var subItems = await ProfileGroupItemManager.GetSubChildProfileItems(group);
|
||||
childIds.AddRange(subItems.Select(p => p.IndexId));
|
||||
childIds.AddRange(Utils.String2List(group.ChildItems));
|
||||
|
||||
foreach (var child in childIds)
|
||||
{
|
||||
|
||||
@@ -230,9 +230,10 @@ public class ProfileGroupItemManager
|
||||
{
|
||||
return (new List<ProfileItem>(), profileGroupItem);
|
||||
}
|
||||
var items = await GetChildProfileItems(profileGroupItem);
|
||||
var subItems = await GetSubChildProfileItems(profileGroupItem);
|
||||
items.AddRange(subItems);
|
||||
|
||||
var items = new List<ProfileItem>();
|
||||
items.AddRange(await GetSubChildProfileItems(profileGroupItem));
|
||||
items.AddRange(await GetChildProfileItems(profileGroupItem));
|
||||
|
||||
return (items, profileGroupItem);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user