mirror of
https://github.com/zen-browser/components.git
synced 2025-07-08 01:20:00 +02:00
Refactor ZenWorkspaces to handle changing workspaces and update context menu
This commit is contained in:
parent
1396523f3b
commit
600d0d7149
1 changed files with 3 additions and 2 deletions
|
@ -141,7 +141,8 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||
activeWorkspace = workspaces.workspaces[0];
|
||||
Services.prefs.setStringPref('zen.workspaces.active', activeWorkspace.uuid);
|
||||
}
|
||||
this.changeWorkspace(activeWorkspace, true);
|
||||
await SessionStore.promiseInitialized;
|
||||
await this.changeWorkspace(activeWorkspace, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -730,10 +731,10 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||
return;
|
||||
}
|
||||
let activeWorkspace = await parent.ZenWorkspaces.getActiveWorkspace();
|
||||
this._lastSelectedWorkspaceTabs[workspaceID] = tab;
|
||||
if (workspaceID === activeWorkspace.uuid) {
|
||||
return;
|
||||
}
|
||||
this._lastSelectedWorkspaceTabs[workspaceID] = tab;
|
||||
await parent.ZenWorkspaces.changeWorkspace({ uuid: workspaceID });
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue