1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-10 04:25:31 +02:00

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
No known key found for this signature in database
GPG key ID: CBD57A2AEDBDA1FB
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);
}
}
}