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

This commit is contained in:
2dust 2026-01-13 20:24:52 +08:00
parent 947c84cf10
commit fe183798b6
2 changed files with 6 additions and 4 deletions

View file

@ -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)
{

View file

@ -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);
}