Preserve Navigation plugin as background plugin eevn when disabled
Summary: This diff fixes an issue where we don't want to have the Navigation plugin be disabled as background plugins like all other plugins, so that the breadcrumb navigation keeps working. Yet another hack concerning the super useful Navigation plugin. On a positive note, since connection management for background is not entirely managed by the Desktop and not the native said, these kind of exceptions are fairly easy to make :) Reviewed By: passy Differential Revision: D21089537 fbshipit-source-id: 209954ff35c95e066fe688a60ad46ccfc3835c44
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b9c3d99f44
commit
dba480ce74
@@ -20,6 +20,7 @@ import {Idler, BaseIdler} from './Idler';
|
||||
import {pluginIsStarred, getSelectedPluginKey} from '../reducers/connections';
|
||||
import {deconstructPluginKey} from './clientUtils';
|
||||
import {onBytesReceived} from '../dispatcher/tracking';
|
||||
import {defaultEnabledBackgroundPlugins} from './pluginUtils';
|
||||
|
||||
const MAX_BACKGROUND_TASK_TIME = 25;
|
||||
|
||||
@@ -223,9 +224,10 @@ export function processMessageLater(
|
||||
break;
|
||||
default:
|
||||
// In all other cases, messages will be dropped...
|
||||
console.warn(
|
||||
`Received message for disabled plugin ${plugin.id}: ${message.method}, dropping..`,
|
||||
);
|
||||
if (!defaultEnabledBackgroundPlugins.includes(plugin.id))
|
||||
console.error(
|
||||
`Received message for disabled plugin ${plugin.id}, dropping..`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user