Remove unused sendNotification IPC
This commit is contained in:
parent
502469e97f
commit
3a6c7b2dcd
4 changed files with 0 additions and 14 deletions
|
@ -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");
|
||||
};
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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[]>;
|
||||
|
|
Loading…
Add table
Reference in a new issue