fix: Fixed session restore for folders with invalid workspace IDs, b=no-bug, c=folders, workspaces

This commit is contained in:
Mr. M
2025-08-20 20:57:51 +02:00
parent d2e0a38bf3
commit 4a87be372d
2 changed files with 11 additions and 9 deletions

View File

@@ -494,7 +494,7 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
workspaceWrapper.addEventListener(
'ZenWorkspaceAttached',
() => {
this._organizeTabsToWorkspaceSections(
this.#organizeTabsToWorkspaceSections(
workspace,
workspaceWrapper.tabsContainer,
workspaceWrapper.pinnedTabsContainer,
@@ -508,7 +508,7 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
});
}
_organizeTabsToWorkspaceSections(workspace, section, pinnedSection, tabs) {
#organizeTabsToWorkspaceSections(workspace, section, pinnedSection, tabs) {
const workspaceTabs = Array.from(tabs).filter(
(tab) => tab.getAttribute('zen-workspace-id') === workspace.uuid
);
@@ -545,11 +545,11 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
}
initializeWorkspaceNavigation() {
this._setupAppCommandHandlers();
this._setupSidebarHandlers();
this.#setupAppCommandHandlers();
this.#setupSidebarHandlers();
}
_setupAppCommandHandlers() {
#setupAppCommandHandlers() {
// Remove existing handler temporarily - this is needed so that _handleAppCommand is called before the original
window.removeEventListener('AppCommand', HandleAppCommandEvent, true);
@@ -591,7 +591,7 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
});
}
_setupSidebarHandlers() {
#setupSidebarHandlers() {
const toolbox = gNavToolbox;
const scrollCooldown = 200; // Milliseconds to wait before allowing another scroll