mirror of
https://github.com/2dust/v2rayN.git
synced 2026-02-28 21:23:04 +00:00
Fix
This commit is contained in:
parent
de0fa9d455
commit
023f9f1a7e
2 changed files with 15 additions and 6 deletions
|
|
@ -1191,10 +1191,15 @@ public static class ConfigHandler
|
||||||
{
|
{
|
||||||
var result = new RetResult();
|
var result = new RetResult();
|
||||||
|
|
||||||
var indexId = Utils.GetGuid(false);
|
|
||||||
var subId = subItem?.Id;
|
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
|
var profile = new ProfileItem
|
||||||
{
|
{
|
||||||
IndexId = indexId,
|
IndexId = indexId,
|
||||||
|
|
@ -1245,14 +1250,18 @@ public static class ConfigHandler
|
||||||
public static async Task<RetResult> AddGroupRegionServer(Config config, SubItem? subItem)
|
public static async Task<RetResult> AddGroupRegionServer(Config config, SubItem? subItem)
|
||||||
{
|
{
|
||||||
var result = new RetResult();
|
var result = new RetResult();
|
||||||
|
var subId = subItem?.Id;
|
||||||
|
if (subId.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
result.Success = false;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
List<string> indexIdList = [];
|
List<string> indexIdList = [];
|
||||||
|
|
||||||
foreach (var regionFilter in PolicyGroupRegionFilters)
|
foreach (var regionFilter in PolicyGroupRegionFilters)
|
||||||
{
|
{
|
||||||
var indexId = Utils.GetGuid(false);
|
var indexId = Utils.GetGuid(false);
|
||||||
var subId = subItem?.Id;
|
var remark = $"{subItem.Remarks} - {ResUI.TbConfigTypePolicyGroup} - {regionFilter.Key}";
|
||||||
|
|
||||||
var remark = subItem is null ? ResUI.TbConfigTypePolicyGroup : $"{subItem.Remarks} - {ResUI.TbConfigTypePolicyGroup} - {regionFilter.Key}";
|
|
||||||
var profile = new ProfileItem
|
var profile = new ProfileItem
|
||||||
{
|
{
|
||||||
IndexId = indexId,
|
IndexId = indexId,
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ public class GroupProfileManager
|
||||||
|
|
||||||
private static async Task<List<ProfileItem>> GetSubChildProfileItems(ProtocolExtraItem? extra)
|
private static async Task<List<ProfileItem>> GetSubChildProfileItems(ProtocolExtraItem? extra)
|
||||||
{
|
{
|
||||||
if (extra == null || extra.Filter.IsNullOrEmpty())
|
if (extra == null || extra.SubChildItems.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue