mirror of
https://github.com/microsoft/PowerToys
synced 2024-11-22 00:03:48 +00:00
[New+]Fix call enabled telemetry event
This commit is contained in:
parent
6d69a79c75
commit
9eb18fc739
@ -91,6 +91,9 @@ public:
|
|||||||
{
|
{
|
||||||
Logger::info("New+ enabled via Settings UI");
|
Logger::info("New+ enabled via Settings UI");
|
||||||
|
|
||||||
|
// Log telemetry
|
||||||
|
Trace::EventToggleOnOff(true);
|
||||||
|
|
||||||
newplus::utilities::register_msix_package();
|
newplus::utilities::register_msix_package();
|
||||||
|
|
||||||
powertoy_new_enabled = true;
|
powertoy_new_enabled = true;
|
||||||
@ -99,8 +102,7 @@ public:
|
|||||||
virtual void disable() override
|
virtual void disable() override
|
||||||
{
|
{
|
||||||
Logger::info("New+ disabled via Settings UI");
|
Logger::info("New+ disabled via Settings UI");
|
||||||
|
Disable(true);
|
||||||
powertoy_new_enabled = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool is_enabled() override
|
virtual bool is_enabled() override
|
||||||
@ -125,12 +127,23 @@ public:
|
|||||||
|
|
||||||
virtual void destroy() override
|
virtual void destroy() override
|
||||||
{
|
{
|
||||||
|
Disable(false);
|
||||||
delete this;
|
delete this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool powertoy_new_enabled = false;
|
bool powertoy_new_enabled = false;
|
||||||
|
|
||||||
|
void Disable(bool const traceEvent)
|
||||||
|
{
|
||||||
|
// Log telemetry
|
||||||
|
if (traceEvent)
|
||||||
|
{
|
||||||
|
Trace::EventToggleOnOff(false);
|
||||||
|
}
|
||||||
|
powertoy_new_enabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
void init_settings()
|
void init_settings()
|
||||||
{
|
{
|
||||||
powertoy_new_enabled = NewSettingsInstance().GetEnabled();
|
powertoy_new_enabled = NewSettingsInstance().GetEnabled();
|
||||||
|
Loading…
Reference in New Issue
Block a user