1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Do not check popupIsOpen on Vivaldi (#9271)

This commit is contained in:
Patryk Łucka 2020-11-06 19:38:48 +01:00 committed by GitHub
parent 9095ae3f47
commit d1430e733e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()
}
}