Refactor ZenWorkspaces to initialize workspace icons and context menus

This commit is contained in:
mauro-balades 2024-09-16 07:51:34 +02:00
parent 329b197bda
commit fa248aecd9

View file

@ -65,6 +65,9 @@ var ZenWorkspaces = {
await IOUtils.writeJSON(this._storeFile, {}); await IOUtils.writeJSON(this._storeFile, {});
} }
if (this.workspaceEnabled) { if (this.workspaceEnabled) {
this._initializeWorkspaceCreationIcons();
this._initializeWorkspaceEditIcons();
this._initializeWorkspaceTabContextMenus();
window.addEventListener('TabClose', this.handleTabClose.bind(this)); window.addEventListener('TabClose', this.handleTabClose.bind(this));
let workspaces = await this._workspaces(); let workspaces = await this._workspaces();
if (workspaces.workspaces.length === 0) { if (workspaces.workspaces.length === 0) {
@ -83,9 +86,6 @@ var ZenWorkspaces = {
} }
this.changeWorkspace(activeWorkspace, true); this.changeWorkspace(activeWorkspace, true);
} }
this._initializeWorkspaceCreationIcons();
this._initializeWorkspaceEditIcons();
this._initializeWorkspaceTabContextMenus();
} }
}, },