From 7dae904e6e724cd2bcfe5b750caf432deb4abf76 Mon Sep 17 00:00:00 2001 From: Quentin Decaunes Date: Sat, 2 Mar 2019 18:33:11 +0100 Subject: [PATCH] Added first launch in-app detection. --- js/app.js | 5 +++++ main.js | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index 1baef1c..a541b52 100644 --- a/js/app.js +++ b/js/app.js @@ -1,4 +1,5 @@ ready(function(){ + const settings = require('electron-settings'); document.isStarting = true; registerRepeaterForAllInput(); registerEventListenerForSettingsInput(); @@ -9,6 +10,10 @@ ready(function(){ reApplyPeriodically(require('electron-settings').get('settings.reapply_periodically')); displayOptionDescription(); document.isStarting = false; + settings.set('settings', { + ...settings.get('settings'), + first_launch: false + }); }); /** diff --git a/main.js b/main.js index 3175d4a..8605e03 100644 --- a/main.js +++ b/main.js @@ -18,7 +18,8 @@ if (settings.get('settings.last_used_version') !== require('./package.json').ver settings.delete('settings.ryzen_adj_path'); settings.set('settings', { ...settings.set('settings'), - last_used_version: require('./package.json').version + last_used_version: require('./package.json').version, + first_launch: true, }); }