Preserve complex profile items during deduplication

https://github.com/2dust/v2rayN/issues/9184
This commit is contained in:
2dust
2026-04-25 10:55:51 +08:00
parent 0af29f50c0
commit 6e85f79852
+8 -2
View File
@@ -1041,13 +1041,19 @@ public static class ConfigHandler
foreach (var item in lstProfile) foreach (var item in lstProfile)
{ {
if (!lstKeep.Exists(i => CompareProfileItem(i, item, false))) if (item.IsComplex())
{ {
lstKeep.Add(item); lstKeep.Add(item);
continue;
}
if (lstKeep.Exists(i => CompareProfileItem(i, item, false)))
{
lstRemove.Add(item);
} }
else else
{ {
lstRemove.Add(item); lstKeep.Add(item);
} }
} }
await RemoveServers(config, lstRemove); await RemoveServers(config, lstRemove);