mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-08 10:56:36 +00:00
merge
This commit is contained in:
@@ -1440,11 +1440,10 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||||||
|
|
||||||
// Second pass: Handle tab selection
|
// Second pass: Handle tab selection
|
||||||
this.tabContainer._invalidateCachedTabs();
|
this.tabContainer._invalidateCachedTabs();
|
||||||
await this._handleTabSelection(window, onInit, containerId, workspaces, previousWorkspace.uuid);
|
const tabToSelect = await this._handleTabSelection(window, onInit, containerId, workspaces, previousWorkspace.uuid);
|
||||||
this.tabContainer._updateVerticalPinnedTabs();
|
|
||||||
|
|
||||||
// Update UI and state
|
// Update UI and state
|
||||||
await this._updateWorkspaceState(window, onInit);
|
await this._updateWorkspaceState(window, onInit, tabToSelect);
|
||||||
}
|
}
|
||||||
|
|
||||||
_updateMarginTopPinnedTabs(arrowscrollbox, pinnedContainer) {
|
_updateMarginTopPinnedTabs(arrowscrollbox, pinnedContainer) {
|
||||||
@@ -1540,10 +1539,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
await Promise.all(animations);
|
await Promise.all(animations);
|
||||||
if (this._beforeSelectedTab) {
|
|
||||||
this._beforeSelectedTab._visuallySelected = false;
|
|
||||||
this._beforeSelectedTab = null;
|
|
||||||
}
|
|
||||||
this._animatingChange = false;
|
this._animatingChange = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1617,21 +1612,19 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If we found a tab to select, select it
|
// If we found a tab to select, select it
|
||||||
if (tabToSelect) {
|
if (!onInit && !tabToSelect) {
|
||||||
gBrowser.selectedTab = tabToSelect;
|
|
||||||
this._lastSelectedWorkspaceTabs[window.uuid] = tabToSelect;
|
|
||||||
} else if (!onInit) {
|
|
||||||
// Create new tab if needed and no suitable tab was found
|
// Create new tab if needed and no suitable tab was found
|
||||||
const newTab = this._createNewTabForWorkspace(window);
|
const newTab = this._createNewTabForWorkspace(window);
|
||||||
gBrowser.selectedTab = newTab;
|
tabToSelect = newTab;
|
||||||
this._lastSelectedWorkspaceTabs[window.uuid] = newTab;
|
|
||||||
}
|
}
|
||||||
|
tabToSelect._visuallySelected = true;
|
||||||
|
this._lastSelectedWorkspaceTabs[window.uuid] = tabToSelect;
|
||||||
|
|
||||||
// Always make sure we always unselect the tab from the old workspace
|
// Always make sure we always unselect the tab from the old workspace
|
||||||
if (currentSelectedTab && currentSelectedTab !== tabToSelect) {
|
if (currentSelectedTab && currentSelectedTab !== tabToSelect) {
|
||||||
currentSelectedTab._selected = false;
|
currentSelectedTab._selected = false;
|
||||||
currentSelectedTab._visuallySelected = true; // we do want to animate the tab deselection
|
|
||||||
this._beforeSelectedTab = currentSelectedTab;
|
|
||||||
}
|
}
|
||||||
|
return tabToSelect;
|
||||||
}
|
}
|
||||||
|
|
||||||
async _updateWorkspaceState(window, onInit) {
|
async _updateWorkspaceState(window, onInit) {
|
||||||
@@ -1659,7 +1652,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||||||
this._invalidateBookmarkContainers();
|
this._invalidateBookmarkContainers();
|
||||||
|
|
||||||
// Update workspace indicator
|
// Update workspace indicator
|
||||||
await this.updateWorkspaceIndicator();
|
await this.updateWorkspaceIndicator(window, this.workspaceIndicator);
|
||||||
}
|
}
|
||||||
|
|
||||||
_invalidateBookmarkContainers() {
|
_invalidateBookmarkContainers() {
|
||||||
|
Reference in New Issue
Block a user