Allow "uninstallation" of bundled plugins

Summary:
Allow "uninstallation" of bundled plugins which means we mark them as uninstalled and not auto-updating anymore. Uninstalled bundled plugins are shown in "Detected in App" section together with Marketplace plugins where user can install them back.

Changelog:
Plugins can be uninstalled from sidebar in new Sandy UI.

Reviewed By: passy

Differential Revision: D25557789

fbshipit-source-id: 751cad68456313c069af639584541086efc7102b
This commit is contained in:
Anton Nikolaev
2020-12-15 09:28:58 -08:00
committed by Facebook GitHub Bot
parent 756edf9860
commit 3d6afdb529
7 changed files with 74 additions and 39 deletions

View File

@@ -200,6 +200,7 @@ function uninstallPlugin(state: StoreState, plugin: PluginDefinition) {
unloadPluginModule(plugin.details);
draft.plugins.clientPlugins.delete(plugin.id);
draft.plugins.devicePlugins.delete(plugin.id);
draft.plugins.loadedPlugins.delete(plugin.id);
draft.pluginManager.uninstalledPlugins.add(plugin.details.name);
});
}