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

Commit

Permalink
Merge pull request #13465 from NejcZdovc/hotifx/#h12758-nag
Browse files Browse the repository at this point in the history
Adds no thanks option to promo notification
  • Loading branch information
NejcZdovc committed Mar 21, 2018
1 parent 0dcc6a3 commit 01b2d78
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/browser/api/ledgerNotifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ const onDynamicResponse = (message, actionId, activeWindow) => {
appActions.onPromotionRemind()
break
}
case 'noThanks':
{
appActions.changeSetting(settings.PAYMENTS_ALLOW_PROMOTIONS, false)
break
}
}

appActions.hideNotification(message)
Expand Down Expand Up @@ -301,6 +306,13 @@ const showPromotionNotification = (state) => {
const data = notification.toJS()
data.position = 'global'

if (data.buttons) {
data.buttons.unshift({
text: locale.translation('noThanks'),
buttonActionId: 'noThanks'
})
}

appActions.showNotification(data)
}

Expand Down

0 comments on commit 01b2d78

Please sign in to comment.