Refactor pinned tab management to improve tab insertion logic and error handling

This commit is contained in:
mr. M
2025-02-24 08:08:01 +01:00
parent 60e2cab249
commit 20ab35fbf9
4 changed files with 127 additions and 116 deletions

View File

@@ -267,9 +267,9 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
// remove tab from list
tabs.splice(tabs.indexOf(tab), 1);
if (tab.pinned) {
pinnedSection.appendChild(tab);
pinnedSection.insertBefore(tab, pinnedSection.lastChild);
} else {
section.appendChild(tab);
section.insertBefore(tab, section.lastChild);
}
}
}