Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Add Turn off notifications to ledger notifications
Browse files Browse the repository at this point in the history
Fix #5299

Auditors: @luixxiul
  • Loading branch information
ayumi committed Nov 8, 2016
1 parent aa08129 commit 967e5de
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions app/ledger.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ if (ipc) {
// buttonIndex === 1 is "Later"; the timestamp until which to delay is set
// in showNotificationAddFunds() when triggering this notification.
if (buttonIndex === 0) {
// Turn off notifications
appActions.changeSetting(settings.PAYMENTS_NOTIFICATIONS, false)
} else if (buttonIndex === 2) {
// Add funds: Open payments panel
Expand All @@ -336,12 +335,17 @@ if (ipc) {
} else if (message === reconciliationMessage) {
appActions.hideMessageBox(message)
// buttonIndex === 1 is Dismiss
if (buttonIndex === 0 && win) {
if (buttonIndex === 0) {
appActions.changeSetting(settings.PAYMENTS_NOTIFICATIONS, false)
} else if (buttonIndex === 2 && win) {
win.webContents.send(messages.SHORTCUT_NEW_FRAME,
'about:preferences#payments', { singleFrame: true })
}
} else if (message === notificationPaymentDoneMessage) {
appActions.hideMessageBox(message)
if (buttonIndex === 0) {
appActions.changeSetting(settings.PAYMENTS_NOTIFICATIONS, false)
}
} else if (message === notificationTryPaymentsMessage) {
appActions.hideMessageBox(message)
if (buttonIndex === 1 && win) {
Expand Down Expand Up @@ -1553,8 +1557,9 @@ const showNotificationReviewPublishers = () => {
greeting: locale.translation('updateHello'),
message: reconciliationMessage,
buttons: [
{text: locale.translation('reviewSites'), className: 'primary'},
{text: locale.translation('dismiss')}
{text: locale.translation('turnOffNotifications')},
{text: locale.translation('dismiss')},
{text: locale.translation('reviewSites'), className: 'primary'}
],
options: {
style: 'greetingStyle',
Expand All @@ -1574,6 +1579,7 @@ const showNotificationPaymentDone = (transactionContributionFiat) => {
greeting: locale.translation('updateHello'),
message: notificationPaymentDoneMessage,
buttons: [
{text: locale.translation('turnOffNotifications')},
{text: locale.translation('Ok'), className: 'primary'}
],
options: {
Expand Down

1 comment on commit 967e5de

@luixxiul
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

Please sign in to comment.