updating: do not update update_check date when we couldn't do it (#9038)

* updating: do not update update_check date when we couldn't do it

- improve general settings page "Last Checked" feature
This commit is contained in:
Andrey Nekrasov
2021-01-12 18:34:02 +03:00
committed by GitHub
parent 7bcf4b7894
commit 1364f78b30
9 changed files with 110 additions and 56 deletions

View File

@@ -237,6 +237,14 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
}
}
public static bool AutoUpdatesEnabled
{
get
{
return Helper.GetProductVersion() != "v0.0.1";
}
}
[SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "This may throw if the XAML page is not initialized in tests (https://github.com/microsoft/PowerToys/pull/2676)")]
public bool IsDarkThemeRadioButtonChecked
{
@@ -388,10 +396,9 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
GeneralSettingsCustomAction customaction = new GeneralSettingsCustomAction(outsettings);
SendCheckForUpdatesConfigMSG(customaction.ToString());
RequestUpdateCheckedDate();
}
private void RequestUpdateCheckedDate()
public void RequestUpdateCheckedDate()
{
GeneralSettingsConfig.CustomActionName = "request_update_state_date";