remove sign along changes

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2020-11-26 09:19:09 -05:00
1 parent 1a5ebc94f4
commit fb109e8cff
3 files changed
+83 -86

No files matched your search

+19 -17
View File
@@ -9,7 +9,7 @@ import { comparer } from "mobx";
export class Tracker extends Util.Singleton {
static readonly GA_ID = "UA-159377374-1";
static readonly SEGMENT_KEY = "YENwswyhlOgz8P7EFKUtIZ2MfON7Yxqb";
protected eventHandlers: Array<(ev: EventBus.AppEvent) => void> = [];
protected eventHandlers: Array<(ev: EventBus.AppEvent ) => void> = [];
protected started = false;
protected visitor: ua.Visitor;
protected analytics: Analytics;
@@ -124,28 +124,30 @@ export class Tracker extends Util.Singleton {
}
protected resolveOS() {
let os = "";
if (App.isMac) {
return "MacOS";
os = "MacOS";
} else if(App.isWindows) {
os = "Windows";
} else if (App.isLinux) {
os = "Linux";
if (App.isSnap) {
os += "; Snap";
} else {
os += "; AppImage";
}
} else {
os = "Unknown";
}
if (App.isWindows) {
return "Windows";
}
if (App.isLinux) {
return `Linux; ${App.isSnap ? "Snap" : "AppImage"}`;
}
return "Unknown";
return os;
}
protected async event(eventCategory: string, eventAction: string, otherParams = {}) {
const allowed = await this.isTelemetryAllowed();
if (!allowed) {
return;
}
try {
const allowed = await this.isTelemetryAllowed();
if (!allowed) {
return;
}
this.visitor.event({
ec: eventCategory,
ea: eventAction,