[Updating] Add versioning to UpdateState.json (#12744)

- fix "Check for updates" hang if UpdateState.json was deleted while the page is open
This commit is contained in:
Andrey Nekrasov
2021-08-12 14:53:51 +03:00
committed by GitHub
parent 0b509a2d0b
commit 05f12dcdf1
8 changed files with 141 additions and 73 deletions

View File

@@ -466,6 +466,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
// callback function to launch the URL to check for updates.
private void CheckForUpdatesClick()
{
RefreshUpdatingState();
IsNewVersionDownloading = string.IsNullOrEmpty(UpdatingSettingsConfig.DownloadedInstallerFilename);
NotifyPropertyChanged(nameof(IsDownloadAllowed));