Skip to content

Commit

Permalink
Do not check popupIsOpen on Vivaldi (#9271)
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrykLucka authored Nov 6, 2020
1 parent 9095ae3 commit d1430e7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,13 @@ async function triggerUi() {
const currentlyActiveMetamaskTab = Boolean(
tabs.find((tab) => openMetamaskTabsIDs[tab.id]),
)
if (!popupIsOpen && !currentlyActiveMetamaskTab) {
// Vivaldi is not closing port connection on popup close, so popupIsOpen does not work correctly
// To be reviewed in the future if this behaviour is fixed - also the way we determine isVivaldi variable might change at some point
const isVivaldi =
tabs.length > 0 &&
tabs[0].extData &&
tabs[0].extData.indexOf('vivaldi_tab') > -1
if ((isVivaldi || !popupIsOpen) && !currentlyActiveMetamaskTab) {
await notificationManager.showPopup()
}
}
Expand Down

0 comments on commit d1430e7

Please sign in to comment.