mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-19 06:53:26 +08:00
Workaround for Settings ViewModel tests (#2693)
This commit is contained in:
parent
1a29870958
commit
3beea79b38
@ -59,7 +59,15 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
this.AutoDownloadUpdates = false;
|
||||
this.Theme = "system";
|
||||
this.SystemTheme = "light";
|
||||
this.PowertoysVersion = interop.CommonManaged.GetProductVersion();
|
||||
try
|
||||
{
|
||||
this.PowertoysVersion = DefaultPowertoysVersion();
|
||||
}
|
||||
catch
|
||||
{
|
||||
this.PowertoysVersion = "v0.0.0";
|
||||
}
|
||||
|
||||
this.Enabled = new EnabledModules();
|
||||
this.CustomActionName = string.Empty;
|
||||
}
|
||||
@ -69,5 +77,10 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
{
|
||||
return JsonSerializer.Serialize(this);
|
||||
}
|
||||
|
||||
private string DefaultPowertoysVersion()
|
||||
{
|
||||
return interop.CommonManaged.GetProductVersion();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user