Fix resetting telemetryEnabled if global setting is toggled off

This commit is contained in:
Saoud Rizwan 2025-02-25 15:43:40 -08:00
parent db463dc1ef
commit 8c5f8b253b

View file

@ -25,6 +25,8 @@ class PostHogClient {
}
private updateTelemetryState(): void {
this.telemetryEnabled = false
// First check global telemetry level - telemetry should only be enabled when level is "all"
const telemetryLevel = vscode.workspace.getConfiguration("telemetry").get<string>("telemetryLevel", "all")
const globalTelemetryEnabled = telemetryLevel === "all"