Fix Checking for Updates - running indefinitely (#17084)

This commit is contained in:
Stefan Markovic 2022-03-18 10:26:29 +01:00 committed by GitHub
parent 34e4e7e5bd
commit f4f8a1bd69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -464,6 +464,9 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
}
public void RefreshUpdatingState()
{
object oLock = new object();
lock (oLock)
{
var config = UpdatingSettings.LoadSettings();
@ -474,7 +477,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
config = UpdatingSettings.LoadSettings();
}
if (config == null || config.ToJsonString() == UpdatingSettingsConfig.ToJsonString())
if (config == null)
{
return;
}
@ -504,3 +507,4 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
}
}
}
}