mirror of
https://github.com/zen-browser/desktop.git
synced 2026-07-09 10:29:32 +00:00
gh-14507: Fix essentials being added to folder without being removed (gh-14508)
Co-authored-by: mr. m <mr.m@tuta.com>
This commit is contained in:
@@ -289,6 +289,9 @@ export class nsZenFolder extends MozTabbrowserTabGroup {
|
||||
addTabs(tabs) {
|
||||
let tabsFromOutside = [];
|
||||
for (let tab of tabs) {
|
||||
if (tab.hasAttribute("zen-essential")) {
|
||||
gZenPinnedTabManager.removeEssentials(tab, false);
|
||||
}
|
||||
if (tab.group !== this) {
|
||||
tabsFromOutside.push(tab);
|
||||
}
|
||||
|
||||
@@ -622,15 +622,13 @@ class nsZenFolders extends nsZenDOMOperatedFeature {
|
||||
}
|
||||
|
||||
createFolder(tabs = [], options = {}) {
|
||||
const filteredTabs = tabs
|
||||
.filter(tab => !tab.hasAttribute("zen-essential"))
|
||||
.map(tab => {
|
||||
gBrowser.pinTab(tab);
|
||||
if (tab?.group?.hasAttribute("split-view-group")) {
|
||||
tab = tab.group;
|
||||
}
|
||||
return tab;
|
||||
});
|
||||
const filteredTabs = tabs.map(tab => {
|
||||
gBrowser.pinTab(tab);
|
||||
if (tab?.group?.hasAttribute("split-view-group")) {
|
||||
tab = tab.group;
|
||||
}
|
||||
return tab;
|
||||
});
|
||||
|
||||
const workspacePinned = gZenWorkspaces.workspaceElement(
|
||||
options.workspaceId
|
||||
|
||||
Reference in New Issue
Block a user