From 8e0c5cb9aa696d0972d330d3dfc66ba61d3d453a Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Tue, 9 Sep 2025 17:55:15 +0800 Subject: [PATCH] Bug fix https://github.com/2dust/v2rayN/issues/7914 --- v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs | 1 + v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs | 2 +- v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml.cs | 1 - v2rayN/v2rayN/Views/ProfilesView.xaml.cs | 1 - 4 files changed, 2 insertions(+), 3 deletions(-) diff --git a/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs b/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs index 7df04380..1f7b427e 100644 --- a/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs @@ -235,6 +235,7 @@ public class MainWindowViewModel : MyReactiveObject { await StatisticsManager.Instance.Init(_config, UpdateStatisticsHandler); } + await RefreshServers(); BlReloadEnabled = true; await Reload(); diff --git a/v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs b/v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs index f5aeac21..14216fee 100644 --- a/v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs @@ -257,7 +257,7 @@ public class ProfilesViewModel : MyReactiveObject SelectedMoveToGroup = new(); await RefreshSubscriptions(); - await RefreshServers(); + //await RefreshServers(); } #endregion Init diff --git a/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml.cs b/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml.cs index 994b0342..c52cad9d 100644 --- a/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml.cs @@ -112,7 +112,6 @@ public partial class ProfilesView : ReactiveUserControl }); RestoreUI(); - ViewModel?.RefreshServers(); } private async void LstProfiles_Sorting(object? sender, DataGridColumnEventArgs e) diff --git a/v2rayN/v2rayN/Views/ProfilesView.xaml.cs b/v2rayN/v2rayN/Views/ProfilesView.xaml.cs index 54e92181..5f8f7033 100644 --- a/v2rayN/v2rayN/Views/ProfilesView.xaml.cs +++ b/v2rayN/v2rayN/Views/ProfilesView.xaml.cs @@ -106,7 +106,6 @@ public partial class ProfilesView }); RestoreUI(); - ViewModel?.RefreshServers(); } #region Event