1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-07 21:49:58 +02:00

fix: Fixed migration system, b=no-bug, c=common

This commit is contained in:
mr. m 2025-06-18 14:04:21 +02:00
parent aebfe65813
commit f62be64de2
No known key found for this signature in database
GPG key ID: 419302196C23B258
3 changed files with 11 additions and 8 deletions

View file

@ -53,3 +53,4 @@ pref("app.update.checkInstallTime.days", 6);
// TODO: Check this out!
pref("browser.profiles.enabled", false);
pref("browser.tabs.groups.enabled", false);
pref("browser.urlbar.scotchBonnet.enableOverride", false);

View file

@ -1,5 +1,5 @@
diff --git a/browser/components/BrowserGlue.sys.mjs b/browser/components/BrowserGlue.sys.mjs
index bde641f7112adde948707c172b9f18d3635d8ef1..0639267770467f6480bb2517ff18eb9622e9dc29 100644
index bde641f7112adde948707c172b9f18d3635d8ef1..3f430451586904e6be086114ec10f719745093be 100644
--- a/browser/components/BrowserGlue.sys.mjs
+++ b/browser/components/BrowserGlue.sys.mjs
@@ -8,6 +8,7 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
@ -10,11 +10,12 @@ index bde641f7112adde948707c172b9f18d3635d8ef1..0639267770467f6480bb2517ff18eb96
AboutHomeStartupCache: "resource:///modules/AboutHomeStartupCache.sys.mjs",
AWToolbarButton: "resource:///modules/aboutwelcome/AWToolbarUtils.sys.mjs",
ASRouter: "resource:///modules/asrouter/ASRouter.sys.mjs",
@@ -1644,6 +1645,7 @@ BrowserGlue.prototype = {
@@ -1659,6 +1660,8 @@ BrowserGlue.prototype = {
} else if (profileDataVersion < APP_DATA_VERSION) {
lazy.ProfileDataUpgrader.upgrade(profileDataVersion, APP_DATA_VERSION);
}
+
+ lazy.gZenUIMigration.init(this._isNewProfile);
},
_migrateUI() {
+ lazy.gZenUIMigration.init(this._isNewProfile, aWindow);
// Use an increasing number to keep track of the current state of the user's
// profile, so we can move data around as needed as the browser evolves.
// Completely unrelated to the current Firefox release number.
async _showUpgradeDialog() {

View file

@ -13,7 +13,8 @@ class ZenUIMigration {
PREF_NAME = 'zen.migration.version';
MIGRATION_VERSION = 5;
init(isNewProfile, win) {
init(isNewProfile) {
const win = lazy.BrowserWindowTracker.getTopWindow();
if (!isNewProfile) {
try {
this._migrate(win);