feat: Properly animate tab addition to collapsed live folders, b=no-bug, c=folders

This commit is contained in:
mr. m
2026-02-27 13:12:28 +01:00
parent 22fd6133f1
commit 1a1804d2be
2 changed files with 10 additions and 7 deletions

View File

@@ -284,12 +284,15 @@ export class nsZenFolder extends MozTabbrowserTabGroup {
let activeTabs = this.activeTabs;
activeTabs.push(...tabs);
gZenFolders._dontAnimateFolder = true;
this.collapsed = false;
for (let tab of activeTabs) {
tab.setAttribute("folder-active", "true");
}
this.collapsed = true;
delete gZenFolders._dontAnimateFolder;
gZenFolders.on_TabGroupExpand({ target: this }).then(() => {
for (let tab of activeTabs) {
tab.setAttribute("folder-active", "true");
}
gZenFolders.on_TabGroupCollapse({ target: this }).then(() => {
delete gZenFolders._dontAnimateFolder;
gBrowser.tabContainer._invalidateCachedVisibleTabs();
});
});
}
}

View File

@@ -1533,7 +1533,7 @@ class nsZenFolders extends nsZenDOMOperatedFeature {
this.#animationCount += 1;
await Promise.all(animations);
this.#animationCount -= 1;
gBrowser.tabContainer._invalidateCachedTabs();
gBrowser.tabContainer._invalidateCachedVisibleTabs();
}
async animateUnload(group, tabToUnload, ungroup = false) {