diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-11-26 23:36:47 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-11-26 23:39:22 +0800 |
commit | 08c98a6df73ffd0c3bbb0d9798eca59cf4ba7209 (patch) | |
tree | 87c5cbd2389780c85ce1d618b81cc9af73900d3f | |
parent | 826eb82ed806772353c720d7ff736ff709539a37 (diff) | |
download | tangerine-wallet-browser-08c98a6df73ffd0c3bbb0d9798eca59cf4ba7209.tar tangerine-wallet-browser-08c98a6df73ffd0c3bbb0d9798eca59cf4ba7209.tar.gz tangerine-wallet-browser-08c98a6df73ffd0c3bbb0d9798eca59cf4ba7209.tar.bz2 tangerine-wallet-browser-08c98a6df73ffd0c3bbb0d9798eca59cf4ba7209.tar.lz tangerine-wallet-browser-08c98a6df73ffd0c3bbb0d9798eca59cf4ba7209.tar.xz tangerine-wallet-browser-08c98a6df73ffd0c3bbb0d9798eca59cf4ba7209.tar.zst tangerine-wallet-browser-08c98a6df73ffd0c3bbb0d9798eca59cf4ba7209.zip |
Show Connect Requests count in extension badge
-rw-r--r-- | app/scripts/background.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js index d577ead41..c75f514d5 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -414,6 +414,7 @@ function setupController (initState, initLangCode) { controller.messageManager.on('updateBadge', updateBadge) controller.personalMessageManager.on('updateBadge', updateBadge) controller.typedMessageManager.on('updateBadge', updateBadge) + controller.providerApprovalController.store.on('update', updateBadge) /** * Updates the Web Extension's "badge" number, on the little fox in the toolbar. @@ -425,7 +426,8 @@ function setupController (initState, initLangCode) { var unapprovedMsgCount = controller.messageManager.unapprovedMsgCount var unapprovedPersonalMsgs = controller.personalMessageManager.unapprovedPersonalMsgCount var unapprovedTypedMsgs = controller.typedMessageManager.unapprovedTypedMessagesCount - var count = unapprovedTxCount + unapprovedMsgCount + unapprovedPersonalMsgs + unapprovedTypedMsgs + const pendingProviderRequests = controller.providerApprovalController.store.getState().providerRequests.length + var count = unapprovedTxCount + unapprovedMsgCount + unapprovedPersonalMsgs + unapprovedTypedMsgs + pendingProviderRequests if (count) { label = String(count) } |