From 86e882c51afca3a44bf20bcd1025161e214e6998 Mon Sep 17 00:00:00 2001 From: kumavis Date: Fri, 31 Mar 2017 18:41:51 -0700 Subject: notification-manager - rename show -> showPoup + make getPopup private --- app/scripts/lib/notification-manager.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'app/scripts/lib') 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) { -- cgit