mirror of
https://github.com/zen-browser/desktop.git
synced 2025-07-10 04:25:31 +02:00
Fixed changing workspaces with container specific essentials turned on
This commit is contained in:
parent
7e897c2a72
commit
ceb0e97610
2 changed files with 11 additions and 1 deletions
|
@ -1583,13 +1583,22 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||
}
|
||||
|
||||
_processTabVisibility(workspaceUuid, containerId, workspaces) {
|
||||
const hiddenTabs = [];
|
||||
const visibleTabs = gBrowser.tabContainer.visibleTabs;
|
||||
for (const tab of gBrowser.tabs) {
|
||||
if (!this._shouldShowTab(tab, workspaceUuid, containerId, workspaces)) {
|
||||
gBrowser.hideTab(tab, undefined, true);
|
||||
hiddenTabs.push(tab);
|
||||
} else if (tab.hasAttribute('zen-essential')) {
|
||||
gBrowser.showTab(tab, undefined, true);
|
||||
}
|
||||
}
|
||||
// If there's no more visible tabs, make a new tab visible
|
||||
if (hiddenTabs.length === visibleTabs.length) {
|
||||
this._createNewTabForWorkspace({ uuid: workspaceUuid });
|
||||
}
|
||||
for (const tab of hiddenTabs) {
|
||||
gBrowser.hideTab(tab, undefined, true);
|
||||
}
|
||||
}
|
||||
|
||||
_shouldShowTab(tab, workspaceUuid, containerId, workspaces) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue