mirror of
https://github.com/zen-browser/components.git
synced 2025-07-08 01:20:00 +02:00
Refactor ZenWorkspaces to use async/await for initialization
This commit is contained in:
parent
fff6dac398
commit
6097e99c99
1 changed files with 3 additions and 5 deletions
|
@ -5,16 +5,14 @@ var ZenWorkspaces = {
|
|||
*/
|
||||
_lastSelectedWorkspaceTabs: {},
|
||||
|
||||
init() {
|
||||
async init() {
|
||||
if (!this.shouldHaveWorkspaces) {
|
||||
console.warn('ZenWorkspaces: !!! ZenWorkspaces is disabled in hidden windows !!!');
|
||||
return; // We are in a hidden window, don't initialize ZenWorkspaces
|
||||
}
|
||||
console.info('ZenWorkspaces: Initializing ZenWorkspaces...');
|
||||
window.SessionStore.promiseInitialized.then(async () => {
|
||||
await this.initializeWorkspaces();
|
||||
console.info('ZenWorkspaces: ZenWorkspaces initialized');
|
||||
});
|
||||
await this.initializeWorkspaces();
|
||||
console.info('ZenWorkspaces: ZenWorkspaces initialized');
|
||||
},
|
||||
|
||||
get shouldShowIconStrip() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue