diff options
author | 0neGal <mail@0negal.com> | 2023-09-13 17:32:16 +0200 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2023-09-13 17:32:16 +0200 |
commit | 2302d7055a11adefe15bdaa5d8f94324d2fe293f (patch) | |
tree | 2c464faadd1bd3cfedf0a234afbd10f0100c8035 /src/index.js | |
parent | 14279b484ee8acbe440e09be25c36f8527592e75 (diff) | |
download | Viper-2302d7055a11adefe15bdaa5d8f94324d2fe293f.tar.gz Viper-2302d7055a11adefe15bdaa5d8f94324d2fe293f.zip |
synchronize changes to settings from main process
If the main process has changes to the settings, said settings will now
also be sent to the renderer, making them synchronized.
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/index.js b/src/index.js index ed0fb3a..301c622 100644 --- a/src/index.js +++ b/src/index.js @@ -130,7 +130,13 @@ function start() { } }); - ipcMain.on("save-settings", (event, obj) => {settings.save(obj)}); + ipcMain.on("save-settings", (event, obj) => { + settings.save(obj, false) + }); + + ipcMain.on("saved-settings", (event, obj) => { + send("changed-settings", obj); + }); // allows renderer to check for updates ipcMain.on("ns-update-event", (event) => {send("ns-update-event", event)}); |