mirror of
https://github.com/2dust/v2rayN.git
synced 2026-10-07 22:28:07 +03:00
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user