Skip to content

Commit

Permalink
Remove disableNotification configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
dideler committed May 28, 2020
1 parent 6114b9b commit 5c291de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions app/utilities/notifier/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { remote } from 'electron'

const conf = remote.getGlobal('conf')
const disableAllNotifications = conf.get('disableNotification')

export function notifySuccess (title, message = '') {
const showSuccessNotifications = conf.get('notifications:success')

let option = { title: title, body: message, silent: true }

if (!disableAllNotifications && showSuccessNotifications) {
if (showSuccessNotifications) {
new Notification(option.title, option)
}
}
Expand All @@ -18,7 +17,7 @@ export function notifyFailure (title, message = '') {

let option = { title: title, body: message, silent: true }

if (!disableAllNotifications && showFailureNotifications) {
if (showFailureNotifications) {
new Notification(option.title, option)
}
}
1 change: 0 additions & 1 deletion configs/defaultConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ module.exports = {
"avatarUrl": ""

},
"disableNotification": false,
"notifications": {
"success": true,
"failure": true
Expand Down

0 comments on commit 5c291de

Please sign in to comment.