mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 17:57:01 +08:00
feat: 修改 IsFirstBootAfterUpdate 的处理方式
更新完设成 True,弹完窗设成 False
This commit is contained in:
@@ -85,6 +85,7 @@ namespace MaaWpfGui
|
||||
{
|
||||
if (_versionUpdateViewModel.IsFirstBootAfterUpdate)
|
||||
{
|
||||
_versionUpdateViewModel.IsFirstBootAfterUpdate = false;
|
||||
_windowManager.ShowWindow(_versionUpdateViewModel);
|
||||
}
|
||||
else
|
||||
@@ -93,6 +94,7 @@ namespace MaaWpfGui
|
||||
|
||||
if (ret == VersionUpdateViewModel.CheckUpdateRetT.OK)
|
||||
{
|
||||
_versionUpdateViewModel.IsFirstBootAfterUpdate = true;
|
||||
_versionUpdateViewModel.AskToRestart();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,10 +125,20 @@ namespace MaaWpfGui
|
||||
set => SetAndNotify(ref _updateUrl, value);
|
||||
}
|
||||
|
||||
private bool _isFirstBootAfterUpdate = Convert.ToBoolean(ViewStatusStorage.Get("VersionUpdate.isfirstboot", bool.FalseString));
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether it is the first boot after updating.
|
||||
/// Gets or sets a value indicating whether it is the first boot after updating.
|
||||
/// </summary>
|
||||
public bool IsFirstBootAfterUpdate => UpdateTag != string.Empty && UpdateTag == _curVersion;
|
||||
public bool IsFirstBootAfterUpdate
|
||||
{
|
||||
get => _isFirstBootAfterUpdate;
|
||||
set
|
||||
{
|
||||
SetAndNotify(ref _isFirstBootAfterUpdate, value);
|
||||
ViewStatusStorage.Set("VersionUpdate.isfirstboot", value.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private string _updatePackageName = ViewStatusStorage.Get("VersionUpdate.package", string.Empty);
|
||||
|
||||
@@ -960,16 +970,6 @@ namespace MaaWpfGui
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Closes view model.
|
||||
/// </summary>
|
||||
public void Close()
|
||||
{
|
||||
RequestClose();
|
||||
/* UpdateTag = string.Empty; */
|
||||
/* UpdateInfo = string.Empty; */
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event handler of opening hyperlink.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user