aboutsummaryrefslogtreecommitdiff
path: root/main.js
diff options
context:
space:
mode:
authorcsett86 <csett86@web.de>2021-09-20 10:40:27 +0200
committerGitHub <noreply@github.com>2021-09-20 10:40:27 +0200
commit295ea6d1ecc485f7980740add37dca0e7678c9f1 (patch)
treefde1701d241a273f2540f033cd953ee8eb19ae86 /main.js
parent9c13108eb32d34e58f0db0829e17b59e3b32a0b9 (diff)
Switch to local storage and migrate old settings (#638)
This is a preparation for electron 14+, where electron-store is no longer in a usable state (currently used version does not work due to remote module removed in electron 14, latest version extends every app startup to 10 seconds). Once sufficient migration period has passed, electron-store and redux-persist-electron-storage and the ipc call introduced here (electron-store-exists) can be removed.
Diffstat (limited to 'main.js')
-rw-r--r--main.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.js b/main.js
index 70530ea..933a84b 100644
--- a/main.js
+++ b/main.js
@@ -396,3 +396,7 @@ ipcMain.on('renderer-ready', () => {
.send('protocol-data-msg', protocolDataForFrontApp);
}
});
+
+ipcMain.on('electron-store-exists', event => {
+ event.returnValue = existsSync(path.join(app.getPath('userData'), 'config.json'));
+});