feat: Improved UI for dialog buttons and fixed workspace specific bookmarks, b=no-bug, c=common, workspaces

This commit is contained in:
mr. m
2026-01-17 02:33:38 +01:00
parent 871e8fcce7
commit 768bb2b5a7
7 changed files with 60 additions and 8 deletions

View File

@@ -132,6 +132,15 @@ class nsZenWorkspaces {
await this.#waitForPromises();
await this.restoreWorkspacesFromSessionStore({});
}
if (!this.privateWindowOrDisabled) {
const observerFunction = async () => {
delete this._workspaceBookmarksCache;
await this.workspaceBookmarks();
this._invalidateBookmarkContainers();
};
Services.obs.addObserver(observerFunction, "workspace-bookmarks-updated");
}
}
log(...args) {
@@ -2297,7 +2306,7 @@ class nsZenWorkspaces {
}
// Reset bookmarks
this._invalidateBookmarkContainers();
this.#invalidateBookmarkContainers();
// Update workspace indicator
await this.updateWorkspaceIndicator(workspace, this.workspaceIndicator);
@@ -2335,7 +2344,7 @@ class nsZenWorkspaces {
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) {
@@ -2343,6 +2352,7 @@ class nsZenWorkspaces {
placesView.invalidateContainer(placesView._resultNode);
}
}
BookmarkingUI.updateEmptyToolbarMessage();
}
updateWorkspacesChangeContextMenu() {