diff --git a/src/zen/common/modules/ZenStartup.mjs b/src/zen/common/modules/ZenStartup.mjs index bfa20f596..664d4bc96 100644 --- a/src/zen/common/modules/ZenStartup.mjs +++ b/src/zen/common/modules/ZenStartup.mjs @@ -98,6 +98,10 @@ class ZenStartup { this.isReady = true; this.promiseInitializedResolve(); delete this.promiseInitializedResolve; + + setTimeout(() => { + gZenWorkspaces._invalidateBookmarkContainers(); + }); }); } diff --git a/src/zen/spaces/ZenSpaceBookmarksStorage.js b/src/zen/spaces/ZenSpaceBookmarksStorage.js index 59da45f61..acfd1ec2e 100644 --- a/src/zen/spaces/ZenSpaceBookmarksStorage.js +++ b/src/zen/spaces/ZenSpaceBookmarksStorage.js @@ -49,7 +49,7 @@ window.ZenWorkspaceBookmarksStorage = { timestamp INTEGER NOT NULL, UNIQUE(bookmark_guid), FOREIGN KEY(bookmark_guid) REFERENCES moz_bookmarks(guid) ON DELETE CASCADE - ) + ) `); // Create index for changes tracking diff --git a/src/zen/spaces/ZenSpaceManager.mjs b/src/zen/spaces/ZenSpaceManager.mjs index 53dcf5bed..c0df1329b 100644 --- a/src/zen/spaces/ZenSpaceManager.mjs +++ b/src/zen/spaces/ZenSpaceManager.mjs @@ -2475,14 +2475,14 @@ class nsZenWorkspaces { this._workspaceBookmarksCache?.bookmarks || {} ).length; if (!onInit || hasWorkspaceBookmarks) { - this.#invalidateBookmarkContainers(); + this._invalidateBookmarkContainers(); } // Update workspace indicator await this.updateWorkspaceIndicator(workspace, this.workspaceIndicator); // Fix ctrl+tab behavior. Note, we dont call it with "await" because we dont want to wait for it - this._fixCtrlTabBehavior(); + this.#fixCtrlTabBehavior(); // Bug: When updating from previous versions, we used to hide the tabs not used in the new workspace // we now need to show them again. @@ -2512,12 +2512,13 @@ class nsZenWorkspaces { ); } - async _fixCtrlTabBehavior() { + // Intentionally keep it as async! + async #fixCtrlTabBehavior() { ctrlTab.uninit(); ctrlTab.readPref(); } - #invalidateBookmarkContainers() { + _invalidateBookmarkContainers() { for (let i = 0, len = this.bookmarkMenus.length; i < len; i++) { const element = document.getElementById(this.bookmarkMenus[i]); if (element && element._placesView) {