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 { ipcRenderer } from "electron";
import { AppUpdateInfo } from "../types"; import { AppUpdateInfo } from "../types";
export const sendNotification = (content: string) => {
ipcRenderer.send("send-notification", content);
};
export const reloadWindow = () => { export const reloadWindow = () => {
ipcRenderer.send("reload-window"); ipcRenderer.send("reload-window");
}; };

View file

@ -56,7 +56,6 @@ import {
registerForegroundEventListener, registerForegroundEventListener,
registerUpdateEventListener, registerUpdateEventListener,
reloadWindow, reloadWindow,
sendNotification,
skipAppUpdate, skipAppUpdate,
updateAndRestart, updateAndRestart,
} from "./api/system"; } from "./api/system";
@ -328,7 +327,6 @@ contextBridge.exposeInMainWorld("ElectronAPIs", {
saveFileToDisk, saveFileToDisk,
selectDirectory, selectDirectory,
clearElectronStore, clearElectronStore,
sendNotification,
reloadWindow, reloadWindow,
readTextFile, readTextFile,
showUploadFilesDialog, showUploadFilesDialog,

View file

@ -4,7 +4,6 @@ import {
BrowserWindow, BrowserWindow,
dialog, dialog,
ipcMain, ipcMain,
Notification,
safeStorage, safeStorage,
shell, shell,
Tray, 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 () => { ipcMain.on("reload-window", async () => {
const secondWindow = await createWindow(); const secondWindow = await createWindow();
mainWindow.destroy(); mainWindow.destroy();

View file

@ -21,7 +21,6 @@ export interface ElectronAPIsType {
) => Promise<void>; ) => Promise<void>;
saveFileToDisk: (path: string, file: any) => Promise<void>; saveFileToDisk: (path: string, file: any) => Promise<void>;
selectDirectory: () => Promise<string>; selectDirectory: () => Promise<string>;
sendNotification: (content: string) => void;
readTextFile: (path: string) => Promise<string>; readTextFile: (path: string) => Promise<string>;
showUploadFilesDialog: () => Promise<ElectronFile[]>; showUploadFilesDialog: () => Promise<ElectronFile[]>;
showUploadDirsDialog: () => Promise<ElectronFile[]>; showUploadDirsDialog: () => Promise<ElectronFile[]>;