mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-13 11:38:31 +08:00
fix(plugin): use config since activatePackage
doesn't persist
This commit is contained in:
parent
ce05e94aeb
commit
02cfbd7878
1 changed files with 4 additions and 2 deletions
|
@ -72,9 +72,11 @@ class PackageManager
|
||||||
|
|
||||||
_onChangePluginState: (event, urlToOpen = "") =>
|
_onChangePluginState: (event, urlToOpen = "") =>
|
||||||
{query} = url.parse(urlToOpen, true)
|
{query} = url.parse(urlToOpen, true)
|
||||||
|
disabled = NylasEnv.config.get('core.disabledPackages') ? []
|
||||||
for name, state of query
|
for name, state of query
|
||||||
if state is "off" then @deactivatePackage(name)
|
if state is "off" and name not in disabled then disabled.push(name)
|
||||||
else if state is "on" then @activatePackage(name)
|
else if state is "on" then disabled = _.without(disabled, name)
|
||||||
|
NylasEnv.config.set('core.disabledPackages', disabled)
|
||||||
|
|
||||||
_resolvePluginIdFor: (packageName, env) =>
|
_resolvePluginIdFor: (packageName, env) =>
|
||||||
metadata = @loadedPackages[packageName]?.metadata
|
metadata = @loadedPackages[packageName]?.metadata
|
||||||
|
|
Loading…
Reference in a new issue