mirror of
https://github.com/zen-browser/desktop.git
synced 2026-04-30 03:04:25 +00:00
Format code for better readability in ZenWorkspaces
This commit is contained in:
@@ -773,8 +773,11 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||||||
|
|
||||||
async getActiveWorkspace() {
|
async getActiveWorkspace() {
|
||||||
const workspaces = await this._workspaces();
|
const workspaces = await this._workspaces();
|
||||||
return workspaces.workspaces.find((workspace) => workspace.uuid === this.activeWorkspace) ??
|
return (
|
||||||
workspaces.workspaces.find((workspace) => workspace.default) ?? workspaces.workspaces[0];
|
workspaces.workspaces.find((workspace) => workspace.uuid === this.activeWorkspace) ??
|
||||||
|
workspaces.workspaces.find((workspace) => workspace.default) ??
|
||||||
|
workspaces.workspaces[0]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
// Workspaces dialog UI management
|
// Workspaces dialog UI management
|
||||||
|
|
||||||
@@ -1857,7 +1860,8 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||||||
gBrowser.tabContainer._invalidateCachedTabs();
|
gBrowser.tabContainer._invalidateCachedTabs();
|
||||||
}
|
}
|
||||||
// Return the number of essentials INSIDE the pinned tabs container so we can correctly change their parent
|
// Return the number of essentials INSIDE the pinned tabs container so we can correctly change their parent
|
||||||
return Array.from(this.pinnedTabsContainer.children).filter((child) => child.getAttribute('zen-essential') === 'true').length;
|
return Array.from(this.pinnedTabsContainer.children).filter((child) => child.getAttribute('zen-essential') === 'true')
|
||||||
|
.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Context menu management
|
// Context menu management
|
||||||
|
|||||||
Reference in New Issue
Block a user