Fix executing the uninstall method when closing the plugin #16522
+54
−26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
之前修改 #16243 的时候被变量名误导了,以为 removePlugins 是卸载的插件。刚刚看代码发现 removePlugins 其实同时包含了禁用的插件和卸载的插件。这就导致了目前如果用户同时使用多个前端,无论用户是关闭还是卸载插件,内核推送 reloadPlugin 之后其他前端都会执行插件的卸载方法。
uninstall(app, item, true);,插件卸载时执行uninstall(app, item, false);