mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-09 22:15:00 +03:00
Preserve subscription profiles on failed import (#10429)
This commit is contained in:
@@ -2134,7 +2134,6 @@ public static class ConfigHandler
|
||||
{
|
||||
lstOriSub = await AppManager.Instance.ProfileItems(subid);
|
||||
activeProfile = lstOriSub?.FirstOrDefault(t => t.IndexId == config.IndexId);
|
||||
await RemoveServersViaSubid(config, subid, true);
|
||||
}
|
||||
|
||||
var counter = 0;
|
||||
@@ -2194,6 +2193,11 @@ public static class ConfigHandler
|
||||
counter = await AddBatchServers4Custom(config, strData, subid, isSub);
|
||||
}
|
||||
|
||||
if (counter > 0 && lstOriSub is { Count: > 0 })
|
||||
{
|
||||
await RemoveServers(config, lstOriSub.Where(item => item.IsSub).ToList());
|
||||
}
|
||||
|
||||
//Select active node
|
||||
if (activeProfile != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user