mirror of
https://github.com/zen-browser/desktop.git
synced 2026-03-29 20:01:52 +00:00
feat: Improved UI for dialog buttons and fixed workspace specific bookmarks, b=no-bug, c=common, workspaces
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user