Skip to content

Commit

Permalink
Added new Disable Automatic Update Check option
Browse files Browse the repository at this point in the history
  • Loading branch information
klaudiosinani committed Jan 20, 2019
1 parent ee94c60 commit 5a46106
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Expand Up @@ -97,7 +97,9 @@ app.on('ready', () => {

webContents.on('crashed', log);

setInterval(() => update.auto(), time.ms(settings.get('updateCheckPeriod')));
if (!settings.get('disableAutoUpdateCheck')) {
setInterval(() => update.auto(), time.ms(settings.get('updateCheckPeriod')));
}
});

process.on('uncaughtException', log);
Expand Down
9 changes: 9 additions & 0 deletions src/menu/help.js
Expand Up @@ -28,6 +28,7 @@ module.exports = {
}
}, {
label: 'Update Check Frequency',
enabled: !settings.get('disableAutoUpdateCheck'),
submenu: [
{
label: 'Once Every 4 Hours',
Expand Down Expand Up @@ -63,6 +64,14 @@ module.exports = {
}
}
]
}, {
label: 'Disable Automatic Update Check',
type: 'checkbox',
checked: settings.get('disableAutoUpdateCheck'),
click(item) {
dialog.confirmActivationRestart('disableAutoUpdateCheck', item.checked);
item.checked = settings.get('disableAutoUpdateCheck');
}
}, {
type: 'separator'
}, {
Expand Down
1 change: 1 addition & 0 deletions src/settings.js
Expand Up @@ -8,6 +8,7 @@ settings.setAll({
alwaysOnTop: settings.get('alwaysOnTop', false),
autoLaunch: settings.get('autoLaunch', false),
autoNightMode: settings.get('autoNightMode', false),
disableAutoUpdateCheck: settings.get('disableAutoUpdateCheck', false),
hideTray: settings.get('hideTray', false),
lastWindowState: {
x: settings.get('lastWindowState.x'),
Expand Down

0 comments on commit 5a46106

Please sign in to comment.