Merge pull request #1037 from johankwarnmarksymphony/SDA-2302

fix: SDA-2302 only start main window one time
This commit is contained in:
Johan Kwarnmark 2020-07-28 15:10:04 +02:00 committed by GitHub
commit da979cf335
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,9 +69,15 @@ if (!isDevEnv) {
/**
* Main function that init the application
*/
let oneStart = false;
const startApplication = async () => {
await app.whenReady();
logger.info(`main: app is ready, performing initial checks`);
if (oneStart) {
return;
}
logger.info('main: app is ready, performing initial checks oneStart: ' + oneStart);
oneStart = true;
createAppCacheFile();
if (config.isFirstTimeLaunch()) {
logger.info(`main: This is a first time launch! will update config and handle auto launch`);