Skip to content

Commit

Permalink
Remove squirrel dependency, error in default telemetry setting
Browse files Browse the repository at this point in the history
  • Loading branch information
pierr3 committed May 4, 2024
1 parent 9a75373 commit 16b5c67
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 29 deletions.
1 change: 1 addition & 0 deletions forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const config: ForgeConfig = {
config: {
installerIcon: "resources/AppIcon/AppIcon.ico",
uninstallerIcon: "resources/AppIcon/AppIcon.ico",
icon: "resources/AppIcon/AppIcon.ico",
license: "LICENSE",
},
},
Expand Down
22 changes: 0 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"bootstrap": "^5.3.3",
"bootstrap-scss": "^5.3.3",
"clsx": "^2.1.0",
"electron-squirrel-startup": "^1.0.0",
"electron-store": "^8.2.0",
"i": "^0.3.7",
"npm": "^10.5.1",
Expand All @@ -84,4 +83,4 @@
"engines": {
"node": ">=20.0.0 <=21.0.0"
}
}
}
7 changes: 2 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ Sentry.init({
sendDefaultPii: false,
});

// Handle creating/removing shortcuts on Windows when installing/uninstalling.
if (require("electron-squirrel-startup")) app.quit();

let version = "";
let mainWindow: BrowserWindow;

Expand Down Expand Up @@ -169,7 +166,7 @@ app.on("ready", () => {
const sclient = Sentry.getClient();
if (sclient) {
// Disable sentry in debug always
sclient.getOptions().enabled = app.isPackaged
sclient.getOptions().enabled = !app.isPackaged
? false
: currentConfiguration.consentedToTelemetry;
} else {
Expand Down Expand Up @@ -384,7 +381,7 @@ ipcMain.handle("change-telemetry", (_, enabled: boolean) => {
});

ipcMain.handle("should-enable-renderer-telemetry", () => {
return app.isPackaged ? false : currentConfiguration.consentedToTelemetry;
return !app.isPackaged ? false : currentConfiguration.consentedToTelemetry;
});

ipcMain.handle(
Expand Down

0 comments on commit 16b5c67

Please sign in to comment.