mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-29 07:27:36 +08:00
update
This commit is contained in:
@@ -75,23 +75,14 @@ namespace System.Application.UI.ViewModels
|
||||
await Task.CompletedTask;
|
||||
}
|
||||
|
||||
protected bool IsFirstActivation = true;
|
||||
|
||||
internal async virtual void Activation()
|
||||
{
|
||||
await Task.CompletedTask;
|
||||
}
|
||||
|
||||
internal bool _IsFirstActivation = true;
|
||||
internal void FirstActivation()
|
||||
{
|
||||
if (_IsFirstActivation)
|
||||
if (IsFirstActivation)
|
||||
{
|
||||
ActivationOnFirst();
|
||||
_IsFirstActivation = false;
|
||||
IsFirstActivation = false;
|
||||
}
|
||||
}
|
||||
|
||||
internal async virtual void ActivationOnFirst()
|
||||
{
|
||||
await Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,8 +102,6 @@ namespace System.Application.UI.ViewModels
|
||||
this.WhenAnyValue(x => x.SelectedItem)
|
||||
.Subscribe(x =>
|
||||
{
|
||||
if (x._IsFirstActivation)
|
||||
Task.Run(x.FirstActivation).ForgetAndDispose();
|
||||
Task.Run(x.Activation).ForgetAndDispose();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -22,11 +22,16 @@ namespace System.Application.UI.ViewModels
|
||||
get => AppResources.ScriptConfig;
|
||||
protected set { throw new NotImplementedException(); }
|
||||
}
|
||||
internal override void ActivationOnFirst()
|
||||
|
||||
internal override void Activation()
|
||||
{
|
||||
if (ProxySettings.IsAutoCheckScriptUpdate)
|
||||
ProxyService.Current.CheckUpdate();
|
||||
base.Activation();
|
||||
|
||||
if (IsFirstActivation)
|
||||
if (ProxySettings.IsAutoCheckScriptUpdate)
|
||||
ProxyService.Current.CheckUpdate();
|
||||
}
|
||||
|
||||
private readonly ReadOnlyObservableCollection<ScriptDTO> _ProxyScripts;
|
||||
public ReadOnlyObservableCollection<ScriptDTO> ProxyScripts => _ProxyScripts;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user