Skip to content

Commit

Permalink
Hide and show tabs correctly when unpinning tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
photodiode committed Dec 8, 2020
1 parent 8b91122 commit b91cba1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ async function tabUpdated(tabId, changeInfo, tab) {
} else {
let activeGroup = (await browser.sessions.getWindowValue(tab.windowId, 'activeGroup'));
await browser.sessions.setTabValue(tab.id, 'groupId', activeGroup);

let activeTabs = await browser.tabs.query({currentWindow: true, active: true, url: browser.extension.getURL("view.html")});

if (activeTabs.length == 0) {
await toggleVisibleTabs(activeGroup);
} else {
await toggleVisibleTabs(-1);
}
}
}
}
Expand Down

0 comments on commit b91cba1

Please sign in to comment.