Skip to content

Commit

Permalink
Added new Disable Automatic Update Check option. Fixes #134
Browse files Browse the repository at this point in the history
  • Loading branch information
klaudiosinani committed Jan 20, 2019
1 parent ad8ef6c commit d74c243
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,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')));
}
});

ipcMain.on('print-to-pdf', pdf.print);
Expand Down
9 changes: 9 additions & 0 deletions src/menu/help.js
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 d74c243

Please sign in to comment.