From d433aa3b0484c43d10e6de1c441e30d5e4a2525b Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Sat, 26 Sep 2026 11:43:22 +0800 Subject: [PATCH] Fix https://github.com/2dust/v2rayN/issues/10236 --- v2rayN/ServiceLib/Resx/ResUI.Designer.cs | 2 +- .../ServiceLib/ViewModels/CheckUpdateViewModel.cs | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs index 0829e0ae..b09c309f 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs +++ b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs @@ -2149,7 +2149,7 @@ namespace ServiceLib.Resx { } /// - /// 查找类似 Not Support 的本地化字符串。 + /// 查找类似 Not Supported 的本地化字符串。 /// public static string MsgNotSupport { get { diff --git a/v2rayN/ServiceLib/ViewModels/CheckUpdateViewModel.cs b/v2rayN/ServiceLib/ViewModels/CheckUpdateViewModel.cs index abba48cb..18d1cb75 100644 --- a/v2rayN/ServiceLib/ViewModels/CheckUpdateViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/CheckUpdateViewModel.cs @@ -42,11 +42,21 @@ public partial class CheckUpdateViewModel : MyReactiveObject this.WhenAnyValue(x => x.EnableUpdateViaProxy) .Subscribe(c => _ = OnUpdateViaProxyChanged()); - RefreshCheckUpdateItems(); + AppEvents.HasUpdateNotified + .AsObservable() + .ObserveOn(RxSchedulers.MainThreadScheduler) + .Subscribe(bl => RefreshCheckUpdateItems(bl)); + + RefreshCheckUpdateItems(true); } - private void RefreshCheckUpdateItems() + private void RefreshCheckUpdateItems(bool hasUpdate) { + if (!hasUpdate) + { + return; + } + var models = CoreInfoManager.Instance.GetCheckUpdateCoreTypes() .Select(t => GetCheckUpdateModel(t)) .ToList();