diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2016-11-19 01:23:20 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2016-11-19 01:23:20 +0800 |
commit | bef023fb4a699c16fe0fff30ce18840678ed7ad0 (patch) | |
tree | d11be9af938712aeb554f070822be01b2d7fbceb /app/scripts/lib/notifications.js | |
parent | 37d836fa72c75945d436bd94feadb65aa95d7e5f (diff) | |
parent | 39e0a33bba2709971edec0304027f646cb2db3cc (diff) | |
download | tangerine-wallet-browser-bef023fb4a699c16fe0fff30ce18840678ed7ad0.tar tangerine-wallet-browser-bef023fb4a699c16fe0fff30ce18840678ed7ad0.tar.gz tangerine-wallet-browser-bef023fb4a699c16fe0fff30ce18840678ed7ad0.tar.bz2 tangerine-wallet-browser-bef023fb4a699c16fe0fff30ce18840678ed7ad0.tar.lz tangerine-wallet-browser-bef023fb4a699c16fe0fff30ce18840678ed7ad0.tar.xz tangerine-wallet-browser-bef023fb4a699c16fe0fff30ce18840678ed7ad0.tar.zst tangerine-wallet-browser-bef023fb4a699c16fe0fff30ce18840678ed7ad0.zip |
Resolve merge conflict.
Diffstat (limited to 'app/scripts/lib/notifications.js')
-rw-r--r-- | app/scripts/lib/notifications.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/app/scripts/lib/notifications.js b/app/scripts/lib/notifications.js index cd7535232..3db1ac6b5 100644 --- a/app/scripts/lib/notifications.js +++ b/app/scripts/lib/notifications.js @@ -15,12 +15,9 @@ function show () { if (err) throw err if (popup) { - // bring focus to existing popup extension.windows.update(popup.id, { focused: true }) - } else { - // create new popup extension.windows.create({ url: 'notification.html', @@ -29,12 +26,11 @@ function show () { width, height, }) - } }) } -function getWindows(cb) { +function getWindows (cb) { // Ignore in test environment if (!extension.windows) { return cb() @@ -45,14 +41,14 @@ function getWindows(cb) { }) } -function getPopup(cb) { +function getPopup (cb) { getWindows((err, windows) => { if (err) throw err cb(null, getPopupIn(windows)) }) } -function getPopupIn(windows) { +function getPopupIn (windows) { return windows ? windows.find((win) => { return (win && win.type === 'popup' && win.height === height && @@ -60,7 +56,7 @@ function getPopupIn(windows) { }) : null } -function closePopup() { +function closePopup () { getPopup((err, popup) => { if (err) throw err if (!popup) return |