Keep Navigation plugin alive even when disabled

Summary:
Navigation plugin is a special cause that will remain connected and process messages directly even when disabled, this is to make sure the bookmarks feature keeps working even when the plugin is not enabled.

Changelog: [Sandy][Navigation] on Android, the currently active deeplink of the application will now be shown in the sidebar

Reviewed By: jknoxville

Differential Revision: D24890375

fbshipit-source-id: eb5e4141740e0436396cea5a7aae24337f2e903e
This commit is contained in:
Michel Weststrate
2020-11-12 04:13:16 -08:00
committed by Facebook GitHub Bot
parent 273b895e30
commit b66f452271
4 changed files with 122 additions and 4 deletions

View File

@@ -124,7 +124,8 @@ export function processMessagesLater(
const isSelected =
pluginKey === getSelectedPluginKey(store.getState().connections);
switch (true) {
case pluginId === 'Navigation': // Navigation events are always processed, to make sure the navbar stays up to date
// Navigation events are always processed immediately, to make sure the navbar stays up to date, see also T69991064
case pluginId === 'Navigation':
case isSelected && getPendingMessages(store, pluginKey).length === 0:
processMessagesImmediately(store, pluginKey, plugin, messages);
break;