mirror of
https://github.com/zen-browser/desktop.git
synced 2026-03-29 11:51:51 +00:00
feat: Correctly assign containers to new live folder tabs, b=no-bug, c=folders
This commit is contained in:
@@ -1709,10 +1709,8 @@ class nsZenFolders extends nsZenDOMOperatedFeature {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!itemVisible) {
|
||||
if (!itemsToHide.includes(item)) {
|
||||
itemsToHide.push(item);
|
||||
}
|
||||
if (!itemVisible && !itemsToHide.includes(item)) {
|
||||
itemsToHide.push(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1757,7 +1755,6 @@ class nsZenFolders extends nsZenDOMOperatedFeature {
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
this.styleCleanup(itemsToHide);
|
||||
this.styleCleanup(selectedTabs);
|
||||
}
|
||||
|
||||
|
||||
@@ -378,6 +378,14 @@ class nsZenLiveFoldersManager {
|
||||
}
|
||||
}
|
||||
|
||||
let userContextId = 0;
|
||||
let space = folder.ownerGlobal.gZenWorkspaces.getWorkspaceFromId(
|
||||
folder.getAttribute("zen-workspace-id")
|
||||
);
|
||||
if (space) {
|
||||
userContextId = space.containerTabId || 0;
|
||||
}
|
||||
|
||||
// Only add the items that are not already in the folder and was not dismissed by the user
|
||||
const newItems = items
|
||||
.filter((item) => {
|
||||
@@ -391,6 +399,7 @@ class nsZenLiveFoldersManager {
|
||||
skipAnimation: true,
|
||||
noInitialLabel: true,
|
||||
lazyTabTitle: item.title,
|
||||
userContextId,
|
||||
});
|
||||
// createLazyBrowser can't be pinned by default
|
||||
this.window.gBrowser.pinTab(tab);
|
||||
|
||||
Reference in New Issue
Block a user