Remove Aptabase Tracking

This commit is contained in:
Agampreet Singh
2025-03-22 14:04:20 +05:30
parent 4c78fdb40c
commit 975265dd02
5 changed files with 0 additions and 68 deletions

View File

@@ -326,35 +326,6 @@ const commonPreferencesSubmenu = [
},
checked: getValue("discordrpcstatus") === "true",
},
{
label: "Enable Aptabase Tracking",
type: "checkbox",
click: () => {
if (getValue("aptabaseTracking") === true) {
setValue("aptabaseTracking", false);
dialog.showMessageBoxSync({
type: "info",
title: "Aptabase Tracking",
message: "Aptabase Tracking has been disabled.",
buttons: ["OK"],
});
return;
} else if (
getValue("aptabaseTracking") === false ||
getValue("aptabaseTracking") === undefined
) {
setValue("aptabaseTracking", true);
dialog.showMessageBoxSync({
type: "info",
title: "Aptabase Tracking",
message: "Aptabase Tracking has been enabled.",
buttons: ["OK"],
});
return;
}
},
checked: getValue("aptabaseTracking") === true,
},
{
label: "Enable Auto Updates",
type: "checkbox",

View File

@@ -32,7 +32,6 @@ getValueOrDefault("custompage", "home");
getValueOrDefault("windowWidth", 0.71);
getValueOrDefault("windowHeight", 0.74);
getValueOrDefault("customWindowSize", false);
getValueOrDefault("aptabaseTracking", null);
getValueOrDefault("externalLinks", "true");
if (getValue("enterprise-or-normal") === "https://microsoft365.com/?auth=1") {

View File

@@ -1,6 +1,5 @@
import { app, Menu, BrowserWindow, dialog, nativeImage, shell } from "electron";
import { clearActivity, setActivity, loginToRPC } from "./config/rpc.js";
import { initialize, trackEvent } from "@aptabase/electron/main";
import { ElectronBlocker } from "@cliqz/adblocker-electron";
import { setValue, getValue } from "./config/store.js";
import { dirname, join } from "path";
@@ -27,12 +26,6 @@ transports.file.level = "verbose";
console.log = _log;
Object.assign(console, functions);
if (getValue("aptabaseTracking") === true) {
initialize("A-US-2528580917").catch((error) => {
console.error("Error initializing:", error);
});
}
function createWindow() {
const enterpriseOrNormal = getValue("enterprise-or-normal");
const custompage = getValue("custompage");
@@ -69,11 +62,6 @@ function createWindow() {
win.webContents.on("did-finish-load", () => {
splash.destroy();
win.show();
if (getValue("aptabaseTracking") === true) {
trackEvent("app_started").catch((error) => {
console.error("Error tracking event:", error);
});
}
if (getValue("discordrpcstatus") === "true") {
setActivity(`On "${win.webContents.getTitle()}"`);
}
@@ -122,21 +110,6 @@ Menu.setApplicationMenu(Menu.buildFromTemplate(menulayout));
app.on("ready", () => {
createWindow();
if (getValue("aptabaseTracking") === null) {
const aptabasedialog = dialog.showMessageBoxSync({
type: "question",
buttons: ["Yes", "No"],
title: "Enable Aptabase Tracking",
message: "Would you like to enable Aptabase Tracking?",
detail:
"Aptabase Tracking helps us improve the app by collecting anonymous usage data. No personal information is collected.\n\nYou can always enable or disable this in the app menu.",
});
if (aptabasedialog === 0) {
setValue("aptabaseTracking", true);
} else {
setValue("aptabaseTracking", false);
}
}
});
app.on("web-contents-created", (event, contents) => {