mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-19 19:37:13 +00:00
fix: Fixed fetching wrong history entries for pinned tabs state cache, b=no-bug, c=workspaces, split-view
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
value: true
|
||||
|
||||
- name: zen.workspaces.dnd-switch-padding
|
||||
value: 10
|
||||
value: 4
|
||||
|
||||
- name: zen.workspaces.debug
|
||||
value: "@cond"
|
||||
|
||||
@@ -859,8 +859,8 @@ class nsZenWindowSync {
|
||||
if (!aTab.linkedBrowser) {
|
||||
return [];
|
||||
}
|
||||
let cachedState = lazy.TabStateCache.get(aTab.linkedBrowser.permanentKey) || { entries: [] };
|
||||
return cachedState.entries || [];
|
||||
let cachedState = lazy.TabStateCache.get(aTab.linkedBrowser.permanentKey) || {};
|
||||
return cachedState.history?.entries || [];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1019,10 +1019,11 @@ class nsZenWindowSync {
|
||||
// There are cases where the pinned state is changed but we don't
|
||||
// wan't to override the initial state we stored when the tab was created.
|
||||
// For example, when session restore pins a tab again.
|
||||
let tabStatePromise;
|
||||
if (!tab._zenPinnedInitialState) {
|
||||
this.setPinnedTabState(tab);
|
||||
tabStatePromise = this.setPinnedTabState(tab);
|
||||
}
|
||||
return this.on_TabMove(aEvent);
|
||||
return Promise.all([tabStatePromise, this.on_TabMove(aEvent)]);
|
||||
}
|
||||
|
||||
on_TabUnpinned(aEvent) {
|
||||
|
||||
@@ -252,6 +252,7 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
|
||||
|
||||
// eslint-disable-next-line complexity
|
||||
onBrowserDragOverToSplit(event) {
|
||||
gBrowser.tabContainer.tabDragAndDrop.clearSpaceSwitchTimer();
|
||||
if (this.fakeBrowser) {
|
||||
return;
|
||||
}
|
||||
@@ -450,7 +451,6 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
|
||||
const side = this.fakeBrowser.getAttribute("side");
|
||||
this._lastOpenedTab = gBrowser.selectedTab;
|
||||
this._draggingTab = null;
|
||||
gBrowser.tabContainer.tabDragAndDrop.clearSpaceSwitchTimer();
|
||||
event.dataTransfer.updateDragImage(
|
||||
...gBrowser.tabContainer.tabDragAndDrop.originalDragImageArgs
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user