mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-05 01:16:35 +00:00
Refactor welcome screen migration logic and remove unused patch file
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
diff --git a/browser/components/migration/MigrationUtils.sys.mjs b/browser/components/migration/MigrationUtils.sys.mjs
|
||||
index 000b471ee6c93815dde61127b8974774d0abafb1..32ba8d40bab5e609fc76dfe97a952d5a7a300a71 100644
|
||||
--- a/browser/components/migration/MigrationUtils.sys.mjs
|
||||
+++ b/browser/components/migration/MigrationUtils.sys.mjs
|
||||
@@ -576,12 +576,15 @@ class MigrationUtils {
|
||||
* True if the source selection page of the wizard should be skipped.
|
||||
* @param {string} [aOptions.profileId]
|
||||
* An identifier for the profile to use when migrating.
|
||||
+ * @param {boolean} [aOptions.zenBlocking=false]
|
||||
+ * True if the migration wizard should block the main thread.
|
||||
* @returns {Promise<undefined>}
|
||||
* If an about:preferences tab can be opened, this will resolve when
|
||||
* that tab has been switched to. Otherwise, this will resolve
|
||||
* just after opening the top-level dialog window.
|
||||
*/
|
||||
showMigrationWizard(aOpener, aOptions) {
|
||||
+ let zenShouldBlock = aOptions.zenBlocking || false;
|
||||
// When migration is kicked off from about:welcome, there are
|
||||
// a few different behaviors that we want to test, controlled
|
||||
// by a preference that is instrumented for Nimbus. The pref
|
||||
@@ -648,7 +651,7 @@ class MigrationUtils {
|
||||
if (aboutWelcomeBehavior == "autoclose") {
|
||||
return aOpener.openPreferences("general-migrate-autoclose");
|
||||
} else if (aboutWelcomeBehavior == "standalone") {
|
||||
- openStandaloneWindow(false /* blocking */);
|
||||
+ openStandaloneWindow(zenShouldBlock /* blocking */);
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
@@ -657,7 +660,7 @@ class MigrationUtils {
|
||||
|
||||
// If somehow we failed to open about:preferences, fall back to opening
|
||||
// the top-level window.
|
||||
- openStandaloneWindow(false /* blocking */);
|
||||
+ openStandaloneWindow(zenShouldBlock /* blocking */);
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
Reference in New Issue
Block a user