Fixed bug where location bar remained active but empty on apps / devices that don't have nav

Summary: Fixed bug where location bar remained active but empty on apps / devices that don't have nav

Reviewed By: nikoant

Differential Revision: D19788337

fbshipit-source-id: c5f7299945783672164ed03d487a023ddaadc082
This commit is contained in:
Michel Weststrate
2020-02-11 07:27:00 -08:00
committed by Facebook Github Bot
parent dfcfca4370
commit 182b2a629d

View File

@@ -28,6 +28,7 @@ import {
styled,
Text,
LoadingIndicator,
getPluginKey,
} from 'flipper';
import {connect} from 'react-redux';
import RatingButton from './RatingButton';
@@ -237,19 +238,27 @@ export default connect<StateFromProps, DispatchFromProps, OwnProps, State>(
launcherMsg,
share,
},
connections: {selectedDevice, selectedApp},
pluginStates,
}) => ({
windowIsFocused,
leftSidebarVisible,
rightSidebarVisible,
rightSidebarAvailable,
downloadingImportData,
launcherMsg,
share,
navPluginIsActive: Object.keys(pluginStates).some(key =>
/#Navigation$/.test(key),
),
}),
}) => {
const navigationPluginKey = getPluginKey(
selectedApp,
selectedDevice,
'Navigation',
);
const navPluginIsActive = !!pluginStates[navigationPluginKey];
return {
windowIsFocused,
leftSidebarVisible,
rightSidebarVisible,
rightSidebarAvailable,
downloadingImportData,
launcherMsg,
share,
navPluginIsActive,
};
},
{
setActiveSheet,
toggleLeftSidebarVisible,