From 975265dd02f2b29a965626eb5958d886de000ffb Mon Sep 17 00:00:00 2001 From: Agampreet Singh <68941022+agam778@users.noreply.github.com> Date: Sat, 22 Mar 2025 14:04:20 +0530 Subject: [PATCH] Remove Aptabase Tracking --- app/config/menu.js | 29 ----------------------------- app/config/store.js | 1 - app/main.js | 27 --------------------------- package.json | 1 - yarn.lock | 10 ---------- 5 files changed, 68 deletions(-) diff --git a/app/config/menu.js b/app/config/menu.js index ab2113f..9b81b41 100644 --- a/app/config/menu.js +++ b/app/config/menu.js @@ -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", diff --git a/app/config/store.js b/app/config/store.js index d6be942..6319b73 100644 --- a/app/config/store.js +++ b/app/config/store.js @@ -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") { diff --git a/app/main.js b/app/main.js index f4a2799..0ddd5ba 100644 --- a/app/main.js +++ b/app/main.js @@ -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) => { diff --git a/package.json b/package.json index 6ca11bd..4162c09 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,6 @@ "prettier-eslint": "^16.1.2" }, "dependencies": { - "@aptabase/electron": "^0.3.1", "@cliqz/adblocker-electron": "^1.26.6", "@xhayper/discord-rpc": "^1.0.21", "axios": "^1.4.0", diff --git a/yarn.lock b/yarn.lock index 810ae3a..6b0e69c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,15 +12,6 @@ __metadata: languageName: node linkType: hard -"@aptabase/electron@npm:^0.3.1": - version: 0.3.1 - resolution: "@aptabase/electron@npm:0.3.1" - peerDependencies: - electron: ">= 3.x" - checksum: 10c0/f26e48f2e3449faf19c36d2ad2a3eb13269ad851187c93f1f095d39d11153108628faa3c70cd3e24ad760f5f0bf8b24d1b7675b2dcc652f500bf46b2c31db2e1 - languageName: node - linkType: hard - "@cliqz/adblocker-content@npm:^1.34.0": version: 1.34.0 resolution: "@cliqz/adblocker-content@npm:1.34.0" @@ -3806,7 +3797,6 @@ __metadata: version: 0.0.0-use.local resolution: "ms-365-electron@workspace:." dependencies: - "@aptabase/electron": "npm:^0.3.1" "@cliqz/adblocker-electron": "npm:^1.26.6" "@xhayper/discord-rpc": "npm:^1.0.21" axios: "npm:^1.4.0"