mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 04:37:30 +02:00
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:
@@ -705,7 +705,7 @@
|
||||
<value>Version:</value>
|
||||
</data>
|
||||
<data name="General_VersionLastChecked.Text" xml:space="preserve">
|
||||
<value>Last checked: </value>
|
||||
<value>Last successfully checked: </value>
|
||||
</data>
|
||||
<data name="General_Version.AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Version</value>
|
||||
|
||||
@@ -133,7 +133,9 @@
|
||||
|
||||
<StackPanel Orientation="Horizontal"
|
||||
Margin="{StaticResource SmallBottomMargin}"
|
||||
AutomationProperties.LabeledBy="{Binding ElementName=General_VersionLastChecked}">
|
||||
AutomationProperties.LabeledBy="{Binding ElementName=General_VersionLastChecked}"
|
||||
Visibility="{Binding AutoUpdatesEnabled,
|
||||
Converter={StaticResource VisibleIfTrueConverter}}">
|
||||
<TextBlock x:Name="General_VersionLastChecked" x:Uid="General_VersionLastChecked" />
|
||||
<TextBlock Text="{x:Bind ViewModel.UpdateCheckedDate, Mode=OneWay}"
|
||||
Foreground="{ThemeResource ListViewItemForegroundPointerOver}"
|
||||
@@ -144,12 +146,14 @@
|
||||
Style="{StaticResource AccentButtonStyle}"
|
||||
Foreground="White"
|
||||
Command="{Binding CheckForUpdatesEventHandler}"
|
||||
IsEnabled="{Binding AutoUpdatesEnabled}"
|
||||
/>
|
||||
|
||||
<ToggleSwitch x:Uid="GeneralPage_ToggleSwitch_AutoDownloadUpdates"
|
||||
Margin="{StaticResource MediumTopMargin}"
|
||||
Visibility="{Binding Mode=TwoWay, Path=IsAdmin, Converter={StaticResource VisibleIfTrueConverter}}"
|
||||
IsOn="{Binding Mode=TwoWay, Path=AutoDownloadUpdates}"/>
|
||||
IsOn="{Binding Mode=TwoWay, Path=AutoDownloadUpdates}"
|
||||
IsEnabled="{Binding AutoUpdatesEnabled}" />
|
||||
|
||||
</StackPanel>
|
||||
|
||||
|
||||
@@ -56,6 +56,11 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
string version = json.GetNamedString("version", string.Empty);
|
||||
bool isLatest = json.GetNamedBoolean("isVersionLatest", false);
|
||||
|
||||
if (json.ContainsKey("version"))
|
||||
{
|
||||
ViewModel.RequestUpdateCheckedDate();
|
||||
}
|
||||
|
||||
var str = string.Empty;
|
||||
if (isLatest)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user