mirror of
https://github.com/zen-browser/desktop.git
synced 2026-03-29 03:41:51 +00:00
feat: Properly animate tab addition to collapsed live folders, b=no-bug, c=folders
This commit is contained in:
@@ -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();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user