Persist uninstalled plugins list
Summary: This diff changes uninstallation procedure for plugins. Instead of deleting plugin files immediately we are keeping them, but mark them as "uninstalled". This makes it possible to re-install plugins quickly in case when user clicked "delete" by mistake. Reviewed By: mweststrate Differential Revision: D25493479 fbshipit-source-id: 9ff29d717cdd5401c55388f24d479599579c8dd3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
df03ccbeab
commit
c3d61cc32d
@@ -57,10 +57,13 @@ export default async (store: Store, logger: Logger) => {
|
||||
|
||||
defaultPluginsIndex = getDefaultPluginsIndex();
|
||||
|
||||
const uninstalledPlugins = store.getState().pluginManager.uninstalledPlugins;
|
||||
|
||||
const initialPlugins: PluginDefinition[] = filterNewestVersionOfEachPlugin(
|
||||
getBundledPlugins(),
|
||||
await getDynamicPlugins(),
|
||||
)
|
||||
.filter((p) => !uninstalledPlugins.has(p.name))
|
||||
.map(reportVersion)
|
||||
.filter(checkDisabled(disabledPlugins))
|
||||
.filter(checkGK(gatekeepedPlugins))
|
||||
|
||||
Reference in New Issue
Block a user