feat(workspace): Move observer notifications to workspaces storage

This commit is contained in:
Kristijan Ribarić 2024-10-05 21:16:07 +02:00
parent 863dcfa705
commit 86578cb4d3
3 changed files with 14 additions and 11 deletions

View file

@ -209,7 +209,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
this._workspaceCache = null;
await this._propagateWorkspaceData();
await this._updateWorkspacesChangeContextMenu();
Services.obs.notifyObservers(null, "zen-workspace-removed", windowID);
}
isWorkspaceActive(workspace) {
@ -559,7 +558,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
workspaceData.name = workspaceName;
workspaceData.icon = icon?.label;
await this.saveWorkspace(workspaceData);
Services.obs.notifyObservers(null, "zen-workspace-updated", workspaceData.uuid);
await this._propagateWorkspaceData();
}
@ -683,7 +681,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
}
let workspaceData = this._createWorkspaceData(name, isDefault, icon);
await this.saveWorkspace(workspaceData);
Services.obs.notifyObservers(null, "zen-workspace-added", workspaceData.uuid);
await this.changeWorkspace(workspaceData);
}
@ -760,7 +757,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
let userContextId = parseInt(event.target.getAttribute('data-usercontextid'));
workspace.containerTabId = userContextId;
await this.saveWorkspace(workspace);
Services.obs.notifyObservers(null, "zen-workspace-updated", workspace.uuid);
await this._propagateWorkspaceData();
}