Remove unused sendNotification IPC

This commit is contained in:
Manav Rathi 2024-03-15 21:38:35 +05:30
parent 502469e97f
commit 3a6c7b2dcd
No known key found for this signature in database
4 changed files with 0 additions and 14 deletions

View file

@ -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");
};

View file

@ -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,

View file

@ -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();

View file

@ -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[]>;