Remove unused plugin update command / redux action

Summary:
This command is never actually dispatched so removing to avoid future confusion.

When new plugins are downloaded a check is done here https://fburl.com/code/e3zedljb to see if pluginIsDisabledForAllConnectedClients, if so, load command is queued, which internally calls update (which resets state)

If the plugin is not disabled then a message appears asking user to manually reload.

Reviewed By: aigoncharov

Differential Revision: D44502476

fbshipit-source-id: b796b77f843218c07ee612d9f45cacba073362d3
This commit is contained in:
Luke De Feo
2023-03-30 10:05:59 -07:00
committed by Facebook GitHub Bot
parent f8e326f4d5
commit e47d99a69e
2 changed files with 0 additions and 17 deletions

View File

@@ -140,9 +140,6 @@ async function processPluginCommandsQueue(
case 'UNINSTALL_PLUGIN':
uninstallPlugin(store, command.payload);
break;
case 'UPDATE_PLUGIN':
updatePlugin(store, command.payload);
break;
case 'SWITCH_PLUGIN':
switchPlugin(store, command.payload);
break;

View File

@@ -19,7 +19,6 @@ export type State = {
export type PluginCommand =
| LoadPluginAction
| UninstallPluginAction
| UpdatePluginAction
| SwitchPluginAction;
export type LoadPluginActionPayload = {
@@ -47,11 +46,6 @@ export type UpdatePluginActionPayload = {
enablePlugin: boolean;
};
export type UpdatePluginAction = {
type: 'UPDATE_PLUGIN';
payload: UpdatePluginActionPayload;
};
export type SwitchPluginActionPayload = {
plugin: PluginDefinition;
selectedApp?: string;
@@ -80,7 +74,6 @@ export default function reducer(
switch (action.type) {
case 'LOAD_PLUGIN':
case 'UNINSTALL_PLUGIN':
case 'UPDATE_PLUGIN':
case 'SWITCH_PLUGIN':
return produce(state, (draft) => {
draft.pluginCommandsQueue.push(action);
@@ -111,13 +104,6 @@ export const pluginCommandsProcessed = (payload: number): Action => ({
payload,
});
export const registerPluginUpdate = (
payload: UpdatePluginActionPayload,
): Action => ({
type: 'UPDATE_PLUGIN',
payload,
});
export const switchPlugin = (payload: SwitchPluginActionPayload): Action => ({
type: 'SWITCH_PLUGIN',
payload,