Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix
  • Loading branch information
DHR60 committed Feb 28, 2026
commit 023f9f1a7ee6485eb4613d265aaa04cfe1be418c
19 changes: 14 additions & 5 deletions v2rayN/ServiceLib/Handler/ConfigHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1191,10 +1191,15 @@ public static async Task<RetResult> AddGroupAllServer(Config config, SubItem? su
{
var result = new RetResult();

var indexId = Utils.GetGuid(false);
var subId = subItem?.Id;
if (subId.IsNullOrEmpty())
{
result.Success = false;
return result;
}

var remark = subItem is null ? ResUI.TbConfigTypePolicyGroup : $"{subItem.Remarks} - {ResUI.TbConfigTypePolicyGroup}";
var indexId = Utils.GetGuid(false);
var remark = $"{subItem.Remarks} - {ResUI.TbConfigTypePolicyGroup}";
var profile = new ProfileItem
{
IndexId = indexId,
Expand Down Expand Up @@ -1245,14 +1250,18 @@ public static async Task<RetResult> AddGroupAllServer(Config config, SubItem? su
public static async Task<RetResult> AddGroupRegionServer(Config config, SubItem? subItem)
{
var result = new RetResult();
var subId = subItem?.Id;
if (subId.IsNullOrEmpty())
{
result.Success = false;
return result;
}
List<string> indexIdList = [];

foreach (var regionFilter in PolicyGroupRegionFilters)
{
var indexId = Utils.GetGuid(false);
var subId = subItem?.Id;

var remark = subItem is null ? ResUI.TbConfigTypePolicyGroup : $"{subItem.Remarks} - {ResUI.TbConfigTypePolicyGroup} - {regionFilter.Key}";
var remark = $"{subItem.Remarks} - {ResUI.TbConfigTypePolicyGroup} - {regionFilter.Key}";
var profile = new ProfileItem
{
IndexId = indexId,
Expand Down
2 changes: 1 addition & 1 deletion v2rayN/ServiceLib/Manager/GroupProfileManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private static async Task<List<ProfileItem>> GetSelectedChildProfileItems(Protoc

private static async Task<List<ProfileItem>> GetSubChildProfileItems(ProtocolExtraItem? extra)
{
if (extra == null || extra.Filter.IsNullOrEmpty())
if (extra == null || extra.SubChildItems.IsNullOrEmpty())
{
return [];
}
Expand Down