mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
Fixed changing workspaces with container specific essentials turned on
This commit is contained in:
@@ -578,6 +578,7 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
opacity: .4;
|
||||
align-items: center;
|
||||
}
|
||||
& #zen-essentials-container {
|
||||
justify-content: center;
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user