Move tracker to telemetry extension (#1092)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen authored and GitHub committed 2020-10-19 11:56:08 +03:00
1 parent a478143423
commit c566c85351
27 files changed
+472 -117

No files matched your search

+3 -3
View File
@@ -7,7 +7,7 @@ import { BaseStore } from "./base-store";
import migrations from "../migrations/user-store"
import { getAppVersion } from "./utils/app-version";
import { kubeConfigDefaultPath, loadConfig } from "./kube-helpers";
import { tracker } from "./tracker";
import { appEventBus } from "./event-bus"
import logger from "../main/logger";
import path from 'path';
@@ -40,7 +40,7 @@ export class UserStore extends BaseStore<UserStoreModel> {
// track telemetry availability
reaction(() => this.preferences.allowTelemetry, allowed => {
tracker.event("telemetry", allowed ? "enabled" : "disabled");
appEventBus.emit({name: "telemetry", action: allowed ? "enabled" : "disabled"})
});
// refresh new contexts
@@ -77,7 +77,7 @@ export class UserStore extends BaseStore<UserStoreModel> {
@action
saveLastSeenAppVersion() {
tracker.event("app", "whats-new-seen")
appEventBus.emit({name: "app", action: "whats-new-seen"})
this.lastSeenAppVersion = getAppVersion();
}