Electron-249 - moved config fields to a constant

This commit is contained in:
Kiran Niranjan 2018-01-08 17:15:24 +05:30 committed by kiranniranjan
parent ab6a4fdc6a
commit 5fd75ab5fa

View File

@ -9,6 +9,14 @@ const logLevels = require('../enums/logLevels.js');
const eventEmitter = require('../eventEmitter');
const aboutApp = require('../aboutApp');
const configFields = [
'minimizeOnClose',
'launchOnStartup',
'alwaysOnTop',
'notificationSettings',
'bringToFront'
];
let minimizeOnClose = false;
let launchOnStartup = false;
let isAlwaysOnTop = false;
@ -296,7 +304,7 @@ function setCheckboxValues() {
/**
* Method that reads multiple config fields
*/
getMultipleConfigField(['minimizeOnClose', 'launchOnStartup', 'alwaysOnTop', 'notificationSettings', 'bringToFront'])
getMultipleConfigField(configFields)
.then(function (configData) {
for (let key in configData) {
if (configData.hasOwnProperty(key)) { // eslint-disable-line no-prototype-builtins