diff --git a/lib/gui/app/os/notification.js b/lib/gui/app/os/notification.js index f7499c6b..c85c589d 100644 --- a/lib/gui/app/os/notification.js +++ b/lib/gui/app/os/notification.js @@ -17,6 +17,7 @@ 'use strict' const electron = require('electron') +const settings = require('../models/settings') /** * @summary Send a notification @@ -41,6 +42,11 @@ const electron = require('electron') * }); */ exports.send = (title, options) => { + // Bail out if desktop notifications are disabled + if (!settings.get('desktopNotifications')) { + return null + } + // `app.dock` is only defined in OS X if (electron.remote.app.dock) { electron.remote.app.dock.bounce() diff --git a/lib/shared/store.js b/lib/shared/store.js index 2975b339..d4d1be29 100644 --- a/lib/shared/store.js +++ b/lib/shared/store.js @@ -104,7 +104,8 @@ const DEFAULT_STATE = Immutable.fromJS({ updatesEnabled: packageJSON.updates.enabled && !_.includes([ 'rpm', 'deb' ], packageJSON.packageType), includeUnstableUpdateChannel: !release.isStableRelease(packageJSON.version), lastSleptUpdateNotifier: null, - lastSleptUpdateNotifierVersion: null + lastSleptUpdateNotifierVersion: null, + desktopNotifications: true } })