Fixed changing workspaces with container specific essentials turned on

This commit is contained in:
mr. M
2025-02-18 21:05:54 +01:00
parent 7e897c2a72
commit ceb0e97610
2 changed files with 11 additions and 1 deletions

View File

@@ -578,6 +578,7 @@
align-items: center;
justify-content: center;
opacity: .4;
align-items: center;
}
& #zen-essentials-container {
justify-content: center;

View File

@@ -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) {