mirror of
https://github.com/zen-browser/components.git
synced 2025-07-08 23:35:31 +02:00
feat(workspace): Move observer notifications to workspaces storage
This commit is contained in:
parent
863dcfa705
commit
86578cb4d3
3 changed files with 14 additions and 11 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue