Adding Telemetry Events for svg and markdown enable/disable (#2814)

* Raising Telemetry events when svg and markdown preview pane is turned off

* Properly serializing Bool property.  This allows us to be backwards compatible with .17 settings but interact with the properties as boolean elements, and fire events on property changed notification
This commit is contained in:
ryanbodrug-microsoft
2020-05-08 16:12:37 -07:00
committed by GitHub
parent e654999fdf
commit d329406eb8
6 changed files with 79 additions and 16 deletions

View File

@@ -27,8 +27,8 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
SettingsUtils.SaveSettings(Settings.ToJsonString(), ModuleName);
}
this._svgRenderIsEnabled = Settings.properties.EnableSvg.Value;
this._mdRenderIsEnabled = Settings.properties.EnableMd.Value;
this._svgRenderIsEnabled = Settings.properties.EnableSvg;
this._mdRenderIsEnabled = Settings.properties.EnableMd;
}
private bool _svgRenderIsEnabled = false;
@@ -46,7 +46,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
if (value != _svgRenderIsEnabled)
{
_svgRenderIsEnabled = value;
Settings.properties.EnableSvg.Value = value;
Settings.properties.EnableSvg = value;
RaisePropertyChanged();
}
}
@@ -64,7 +64,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
if (value != _mdRenderIsEnabled)
{
_mdRenderIsEnabled = value;
Settings.properties.EnableMd.Value = value;
Settings.properties.EnableMd = value;
RaisePropertyChanged();
}
}