aboutsummaryrefslogtreecommitdiff
path: root/src/index.js
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2022-01-24 18:21:13 +0100
committer0neGal <mail@0negal.com>2022-01-24 18:21:13 +0100
commit9c6ac295189acab7303952725755dfac87e18470 (patch)
tree2832c0f0463c81dbe80a2c939178b7d8f165eb89 /src/index.js
parent0c0cce0d79cc222cd467b6499d06ccb7d222cd0b (diff)
downloadViper-9c6ac295189acab7303952725755dfac87e18470.tar.gz
Viper-9c6ac295189acab7303952725755dfac87e18470.zip
no alert when manually changing the game path
When changing the game path by clicking the button you shouldn't be told it can't find the game and you've to select one manually, as you know that already. More importantly, if it could be found automatically it'll just not do anything. With this change I also changed the "gui.setpath" string to be more logical, and to make it clear what it does.
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/index.js b/src/index.js
index f4207e7..c8bfc53 100644
--- a/src/index.js
+++ b/src/index.js
@@ -87,9 +87,13 @@ ipcMain.on("launchVanilla", (event) => {utils.launch("vanilla")})
ipcMain.on("update", (event) => {utils.update()})
ipcMain.on("setpathcli", (event) => {utils.setpath()});
ipcMain.on("setpath", (event, value) => {
- if (!value) {
- utils.setpath(win);
- } else if (!win.isVisible()) {
+ if (! value) {
+ if (! win.isVisible()) {
+ utils.setpath(win);
+ } else {
+ utils.setpath(win, true);
+ }
+ } else if (! win.isVisible()) {
win.show();
}
});