feat: Make sure to run a migration for deferred sessions as well, b=no-bug, c=tabs, workspaces

This commit is contained in:
mr. m
2026-01-26 17:24:12 +01:00
parent ccc1e998da
commit 9afbd1befd
3 changed files with 30 additions and 15 deletions

View File

@@ -6,6 +6,12 @@
import { nsZenThemePicker } from "chrome://browser/content/zen-components/ZenGradientGenerator.mjs";
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
ZenSessionStore: "resource:///modules/zen/ZenSessionManager.sys.mjs",
});
/**
* Zen Spaces manager. This class is mainly responsible for the UI
* and user interactions but it also contains some logic to manage
@@ -888,6 +894,13 @@ class nsZenWorkspaces {
return Promise.resolve();
}
const spacesFromStore = aWinData.spaces || [];
if (
!this.privateWindowOrDisabled &&
spacesFromStore.length === 0 &&
lazy.ZenSessionStore._migrationData
) {
spacesFromStore.push(...lazy.ZenSessionStore._migrationData.spaces);
}
this._workspaceCache = spacesFromStore.length
? [...spacesFromStore]
: [this.#createWorkspaceData("Space", undefined)];