Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Remove unused sendNotification IPC

Manav Rathi3a6c7b2dcd13
diff --git a/desktop/src/api/system.ts b/desktop/src/api/system.ts
index a4dc91e054..4f068169fe 100644
--- a/desktop/src/api/system.ts
+++ b/desktop/src/api/system.ts
@@ -1,9 +1,6 @@
import { ipcRenderer } from "electron";
import { AppUpdateInfo } from "../types";
-export const sendNotification = (content: string) => {
- ipcRenderer.send("send-notification", content);
-};
export const reloadWindow = () => {
ipcRenderer.send("reload-window");
};
diff --git a/desktop/src/preload.ts b/desktop/src/preload.ts
index 2485c92a21..dee5a2063f 100644
--- a/desktop/src/preload.ts
+++ b/desktop/src/preload.ts
@@ -56,7 +56,6 @@ import {
registerForegroundEventListener,
registerUpdateEventListener,
reloadWindow,
- sendNotification,
skipAppUpdate,
updateAndRestart,
} from "./api/system";
@@ -328,7 +327,6 @@ contextBridge.exposeInMainWorld("ElectronAPIs", {
saveFileToDisk,
selectDirectory,
clearElectronStore,
- sendNotification,
reloadWindow,
readTextFile,
showUploadFilesDialog,
diff --git a/desktop/src/utils/ipcComms.ts b/desktop/src/utils/ipcComms.ts
index b13c5e3bc8..c64123439b 100644
--- a/desktop/src/utils/ipcComms.ts
+++ b/desktop/src/utils/ipcComms.ts
@@ -4,7 +4,6 @@ import {
BrowserWindow,
dialog,
ipcMain,
- Notification,
safeStorage,
shell,
Tray,
@@ -44,13 +43,6 @@ export default function setupIpcComs(
}
});
- ipcMain.on("send-notification", (_, args) => {
- const notification = {
- title: "ente",
- body: args,
- };
- new Notification(notification).show();
- });
ipcMain.on("reload-window", async () => {
const secondWindow = await createWindow();
mainWindow.destroy();
diff --git a/web/packages/shared/electron/types.ts b/web/packages/shared/electron/types.ts
index ad23f85121..43d55faac9 100644
--- a/web/packages/shared/electron/types.ts
+++ b/web/packages/shared/electron/types.ts
@@ -21,7 +21,6 @@ export interface ElectronAPIsType {
) => Promise<void>;
saveFileToDisk: (path: string, file: any) => Promise<void>;
selectDirectory: () => Promise<string>;
- sendNotification: (content: string) => void;
readTextFile: (path: string) => Promise<string>;
showUploadFilesDialog: () => Promise<ElectronFile[]>;
showUploadDirsDialog: () => Promise<ElectronFile[]>;