From 244d4c94b4b9d9941e052a110ca9e7b061ea5c5c Mon Sep 17 00:00:00 2001 From: Lino Schmidt Date: Tue, 11 Apr 2023 21:13:31 +0200 Subject: [PATCH] Fixed setting warning --- src/components/settings.ts | 41 +------------------------------------- 1 file changed, 1 insertion(+), 40 deletions(-) diff --git a/src/components/settings.ts b/src/components/settings.ts index cec784e..b0d572c 100644 --- a/src/components/settings.ts +++ b/src/components/settings.ts @@ -210,46 +210,7 @@ const settingList = await fetch(SettingPath).then(function(response) { } }); if(fetchFailed !== "") { - if(fetchFailed === "fileLoadFailed") { - dialog.showMessageBox({ - type: 'warning', - buttons: ['View Settings', 'Continue'], - defaultId: 1, - title: 'Warning!', - message: "Failed to load settings file. Using default settings. if you continue, the settings will be overwritten.", - }).then((result) => { - if(result.response === 0) { - ipcRenderer.send('closeApp'); - app.quit(); - } - }); - } else if(fetchFailed === "singleSetting") { - dialog.showMessageBox({ - type: 'warning', - buttons: ['View Settings', 'Continue'], - defaultId: 1, - title: 'Warning!', - message: "A setting failed to load. If you continue, the setting will be overwritten.", - }).then((result) => { - if(result.response === 0) { - ipcRenderer.send('closeApp'); - app.quit(); - } - }); - } else if(fetchFailed === "multiSetting") { - dialog.showMessageBox({ - type: 'warning', - buttons: ['View Settings', 'Continue'], - defaultId: 1, - title: 'Warning!', - message: "Multiple settings failed to load. If you continue, the settings will be overwritten.", - }).then((result) => { - if(result.response === 0) { - ipcRenderer.send('closeApp'); - app.quit(); - } - }); - } + writeSettings(); } function getProfiles() {