mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
Fixed workspace switching
This commit is contained in:
@@ -37,7 +37,6 @@
|
||||
this.initCanvas();
|
||||
this.initCustomColorInput();
|
||||
|
||||
ZenWorkspaces.addChangeListeners(this.onWorkspaceChange.bind(this));
|
||||
window.matchMedia('(prefers-color-scheme: dark)').addListener(this.onDarkModeChange.bind(this));
|
||||
}
|
||||
|
||||
|
@@ -1627,7 +1627,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
return tabToSelect;
|
||||
}
|
||||
|
||||
async _updateWorkspaceState(window, onInit) {
|
||||
async _updateWorkspaceState(window, onInit, tabToSelect) {
|
||||
// Update document state
|
||||
document.documentElement.setAttribute('zen-workspace-id', window.uuid);
|
||||
|
||||
@@ -1639,6 +1639,11 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
gZenUIManager.updateTabsToolbar();
|
||||
await this._propagateWorkspaceData({ clearCache: false });
|
||||
|
||||
gZenThemePicker.onWorkspaceChange(window);
|
||||
|
||||
await this._animateTabs(window, !onInit && !this._animatingChange);
|
||||
gBrowser.selectedTab = tabToSelect;
|
||||
|
||||
// Notify listeners
|
||||
if (this._changeListeners?.length) {
|
||||
for (const listener of this._changeListeners) {
|
||||
@@ -1646,8 +1651,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
}
|
||||
}
|
||||
|
||||
await this._animateTabs(window, !onInit && !this._animatingChange);
|
||||
|
||||
// Reset bookmarks
|
||||
this._invalidateBookmarkContainers();
|
||||
|
||||
|
Reference in New Issue
Block a user