mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-15 21:28:40 -09:00
Always notify watchers of plugin updates (#2508)
During plugin updates, each `plugin.onUnload` is invoked regardless of whether the plugin changed. This commit ensures that each `plugin.onApp` is invoked once all plugins have been updated. Fixes #2415.
This commit is contained in:
parent
cb8b72a319
commit
bbb1caefb4
1 changed files with 2 additions and 1 deletions
|
|
@ -87,6 +87,8 @@ function updatePlugins({force = false} = {}) {
|
||||||
cache.set('hyper.plugin-versions', pluginVersions);
|
cache.set('hyper.plugin-versions', pluginVersions);
|
||||||
|
|
||||||
// notify watchers
|
// notify watchers
|
||||||
|
watchers.forEach(fn => fn(err, {force}));
|
||||||
|
|
||||||
if (force || changed) {
|
if (force || changed) {
|
||||||
if (changed) {
|
if (changed) {
|
||||||
notify('Plugins Updated', 'Restart the app or hot-reload with "View" > "Reload" to enjoy the updates!');
|
notify('Plugins Updated', 'Restart the app or hot-reload with "View" > "Reload" to enjoy the updates!');
|
||||||
|
|
@ -94,7 +96,6 @@ function updatePlugins({force = false} = {}) {
|
||||||
notify('Plugins Updated', 'No changes!');
|
notify('Plugins Updated', 'No changes!');
|
||||||
}
|
}
|
||||||
checkDeprecatedExtendKeymaps();
|
checkDeprecatedExtendKeymaps();
|
||||||
watchers.forEach(fn => fn(err, {force}));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue