Bläddra i källkod

Remove unused sendNotification IPC

Manav Rathi 1 år sedan
förälder
incheckning
3a6c7b2dcd

+ 0 - 3
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");
 };

+ 0 - 2
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,

+ 0 - 8
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();

+ 0 - 1
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[]>;