aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-04-01 09:41:51 +0800
committerkumavis <aaron@kumavis.me>2017-04-01 09:41:51 +0800
commit86e882c51afca3a44bf20bcd1025161e214e6998 (patch)
treee7db8e909888506a21fa6c2fbfa04a3fa2cbcfc1
parentaa06183c64b79316a4622e25791c29e785c7bce0 (diff)
downloadtangerine-wallet-browser-86e882c51afca3a44bf20bcd1025161e214e6998.tar
tangerine-wallet-browser-86e882c51afca3a44bf20bcd1025161e214e6998.tar.gz
tangerine-wallet-browser-86e882c51afca3a44bf20bcd1025161e214e6998.tar.bz2
tangerine-wallet-browser-86e882c51afca3a44bf20bcd1025161e214e6998.tar.lz
tangerine-wallet-browser-86e882c51afca3a44bf20bcd1025161e214e6998.tar.xz
tangerine-wallet-browser-86e882c51afca3a44bf20bcd1025161e214e6998.tar.zst
tangerine-wallet-browser-86e882c51afca3a44bf20bcd1025161e214e6998.zip
notification-manager - rename show -> showPoup + make getPopup private
-rw-r--r--app/scripts/background.js2
-rw-r--r--app/scripts/lib/notification-manager.js20
2 files changed, 11 insertions, 11 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js
index 5fb56d497..7211f1e0c 100644
--- a/app/scripts/background.js
+++ b/app/scripts/background.js
@@ -147,7 +147,7 @@ function setupController (initState) {
// popup trigger
function triggerUi () {
- if (!popupIsOpen) notificationManager.show()
+ if (!popupIsOpen) notificationManager.showPopup()
}
// On first install, open a window to MetaMask website to how-it-works.
diff --git a/app/scripts/lib/notification-manager.js b/app/scripts/lib/notification-manager.js
index ff8a4b2e5..55e5b8dd2 100644
--- a/app/scripts/lib/notification-manager.js
+++ b/app/scripts/lib/notification-manager.js
@@ -9,8 +9,8 @@ class NotificationManager {
// Public
//
- show () {
- this.getPopup((err, popup) => {
+ showPopup () {
+ this._getPopup((err, popup) => {
if (err) throw err
if (popup) {
@@ -31,15 +31,8 @@ class NotificationManager {
})
}
- getPopup (cb) {
- this._getWindows((err, windows) => {
- if (err) throw err
- cb(null, this._getPopupIn(windows))
- })
- }
-
closePopup () {
- this.getPopup((err, popup) => {
+ this._getPopup((err, popup) => {
if (err) throw err
if (!popup) return
extension.windows.remove(popup.id, console.error)
@@ -50,6 +43,13 @@ class NotificationManager {
// Private
//
+ _getPopup (cb) {
+ this._getWindows((err, windows) => {
+ if (err) throw err
+ cb(null, this._getPopupIn(windows))
+ })
+ }
+
_getWindows (cb) {
// Ignore in test environment
if (!extension.windows) {