diff --git a/desktop/electron/src/ipc.ts b/desktop/electron/src/ipc.ts index c62ba157..563506aa 100644 --- a/desktop/electron/src/ipc.ts +++ b/desktop/electron/src/ipc.ts @@ -64,7 +64,7 @@ export default () => { return true; }); - ipcMain.handle("local-app:addServer", async (event, server: Omit) => { + ipcMain.handle("local-app:addServer", (event, server: Omit) => { const servers = settings.get("servers") || []; try { diff --git a/desktop/electron/src/preload-app/preload.ts b/desktop/electron/src/preload-app/preload.ts index bd7239e7..702cbef5 100644 --- a/desktop/electron/src/preload-app/preload.ts +++ b/desktop/electron/src/preload-app/preload.ts @@ -1,4 +1,4 @@ -import { contextBridge, ipcRenderer, IpcRendererEvent } from "electron"; +import { contextBridge, ipcRenderer } from "electron"; import type { WorkAdventureDesktopApi } from "./types"; const api: WorkAdventureDesktopApi = { diff --git a/desktop/electron/src/preload-app/types.ts b/desktop/electron/src/preload-app/types.ts index 6b004a0f..164153a5 100644 --- a/desktop/electron/src/preload-app/types.ts +++ b/desktop/electron/src/preload-app/types.ts @@ -1,10 +1,8 @@ -import type { IpcRendererEvent } from "electron"; - export type WorkAdventureDesktopApi = { desktop: boolean; isDevelopment: () => Promise; getVersion: () => Promise; notify: (txt: string) => void; - onMuteToggle: (callback: (event: IpcRendererEvent) => void) => void; - onCameraToggle: (callback: (event: IpcRendererEvent) => void) => void; + onMuteToggle: (callback: () => void) => void; + onCameraToggle: (callback: () => void) => void; };