Browse Source

Bug fix

pull/5940/head
2dust 4 weeks ago
parent
commit
fa148cdf42
  1. 5
      v2rayN/ServiceLib/ViewModels/RoutingRuleSettingViewModel.cs

5
v2rayN/ServiceLib/ViewModels/RoutingRuleSettingViewModel.cs

@ -176,13 +176,14 @@ namespace ServiceLib.ViewModels
return; return;
} }
var lst = new List<RulesItem4Ray>(); var lst = new List<RulesItem>();
foreach (var it in SelectedSources ?? [SelectedSource]) foreach (var it in SelectedSources ?? [SelectedSource])
{ {
var item = _rules.FirstOrDefault(t => t.Id == it?.Id); var item = _rules.FirstOrDefault(t => t.Id == it?.Id);
if (item != null) if (item != null)
{ {
var item2 = JsonUtils.Deserialize<RulesItem4Ray>(JsonUtils.Serialize(item)); var item2 = JsonUtils.DeepCopy(item); //JsonUtils.Deserialize<RulesItem4Ray>(JsonUtils.Serialize(item));
item2.Id = null;
lst.Add(item2 ?? new()); lst.Add(item2 ?? new());
} }
} }

Loading…
Cancel
Save