From 61f297215dec7000f4afbc12ce46d2170e3481ea Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Wed, 1 Feb 2023 11:08:05 +0800 Subject: [PATCH] Optimize remove server --- v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs b/v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs index 74f14556..0d9d2b78 100644 --- a/v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs +++ b/v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs @@ -905,12 +905,16 @@ namespace v2rayN.ViewModels { return; } + var exists = lstSelecteds.Exists(t => t.indexId == _config.indexId); ConfigHandler.RemoveServer(_config, lstSelecteds); _noticeHandler?.Enqueue(ResUI.OperationSuccess); RefreshServers(); - Reload(); + if (exists) + { + Reload(); + } } private void RemoveDuplicateServer()