mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-07 21:24:24 +08:00
[client-app] Allow the packageMigrationManager to re-enable packages
Summary: Remove packages from the disabled package list when they have been migrated to be enabled by default. Also, the last migration would not have worked properly anyways because the daily channel was already on 1.0.56, and we check for greater-than rather than equal-to. Bump that version to match the next update. Test Plan: manual Reviewers: juan, evan Reviewed By: juan, evan Differential Revision: https://phab.nylas.com/D4335
This commit is contained in:
parent
7d99567855
commit
2b39af5aba
1 changed files with 7 additions and 2 deletions
|
@ -21,7 +21,7 @@ const PACKAGE_MIGRATIONS = [
|
|||
}],
|
||||
},
|
||||
{
|
||||
"version": "1.0.56",
|
||||
"version": "2.0.1",
|
||||
"package-migrations": [
|
||||
{
|
||||
"new-name": "thread-snooze",
|
||||
|
@ -98,7 +98,12 @@ class PackageMigrationManager {
|
|||
// If the old install was enabled, keep it that way
|
||||
if (oldEnabledPackNames.includes(migration['old-name'])) { return }
|
||||
// If we want to enable the package by default,
|
||||
if (migration['enabled-by-default']) { return }
|
||||
if (migration['enabled-by-default']) {
|
||||
if (disabledPackNames.includes(migration['old-name'])) {
|
||||
this.config.removeAtKeyPath('core.disabledPackages', migration['old-name'])
|
||||
}
|
||||
return
|
||||
}
|
||||
const newName = migration['new-name']
|
||||
this.config.pushAtKeyPath('core.disabledPackages', newName);
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue