mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-07 18:36:36 +00:00
Fixed changing workspaces with container specific essentials turned on
This commit is contained in:
@@ -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