From ef73af66c4c3d34eab6ae8386dc2d771874aac1e Mon Sep 17 00:00:00 2001 From: smartfrigde <37928912+smartfrigde@users.noreply.github.com> Date: Tue, 14 Jun 2022 14:54:34 +0200 Subject: [PATCH] Move the getLang handler to main ipc module instead of storing it in settings --- src/ipc.ts | 3 +++ src/settings/main.ts | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ipc.ts b/src/ipc.ts index c3a9e01..a8b7606 100644 --- a/src/ipc.ts +++ b/src/ipc.ts @@ -14,6 +14,9 @@ export function registerIpc() { ipcMain.on("setLang", (event, lang: string) => { setLang(lang); }); + ipcMain.handle("getLang", (event, toGet: string) => { + return getLang(toGet); + }); ipcMain.on("open-external-link", (event, href: string) => { shell.openExternal(href); }); diff --git a/src/settings/main.ts b/src/settings/main.ts index 4167f62..008ada6 100644 --- a/src/settings/main.ts +++ b/src/settings/main.ts @@ -31,9 +31,6 @@ export function createSettingsWindow() { ipcMain.handle("getSetting", (event, toGet: string) => { return getConfig(toGet); }); - ipcMain.handle("getLang", (event, toGet: string) => { - return getLang(toGet); - }); settingsWindow.webContents.setWindowOpenHandler(({url}) => { shell.openExternal(url); return {action: "deny"};