Skip to content

Commit 0fd1f78

Browse files
authored
ref(electron): remove dead code (#1214)
Removed dead code: `handleBadgeCount` function and the IPC handler, as well ass `session` unused import.
1 parent 2492f59 commit 0fd1f78

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.changeset/fancy-deer-clean.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@spotlightjs/spotlight": patch
3+
---
4+
5+
Remove dead code

packages/spotlight/src/electron/main/index.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import path from "node:path";
22
import { fileURLToPath } from "node:url";
33
import * as Sentry from "@sentry/electron/main";
4-
import { BrowserWindow, Menu, Tray, app, dialog, ipcMain, nativeImage, session, shell } from "electron";
4+
import { BrowserWindow, Menu, Tray, app, dialog, nativeImage, shell } from "electron";
55
import Store from "electron-store";
66
import { autoUpdater } from "electron-updater";
77
import { sentryBaseConfig } from "../../sentry-config";
@@ -409,9 +409,6 @@ const template: Electron.MenuItemConstructorOptions[] = [
409409
},
410410
];
411411

412-
function handleBadgeCount(_event, count) {
413-
app.setBadgeCount(count);
414-
}
415412
const menu = Menu.buildFromTemplate(template);
416413
Menu.setApplicationMenu(menu);
417414

@@ -605,8 +602,6 @@ app.whenReady().then(() => {
605602
app.on("activate", () => {
606603
showOrCreateWindow();
607604
});
608-
609-
ipcMain.on("set-badge-count", handleBadgeCount);
610605
});
611606

612607
const MAX_RETRIES = 3;

0 commit comments

Comments
 (0)