Move the getLang handler to main ipc module instead of storing it in settings

This commit is contained in:
smartfrigde 2022-06-14 14:54:34 +02:00
parent bdb09bb912
commit ef73af66c4
2 changed files with 3 additions and 3 deletions

View file

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

View file

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