Fix navigation crash on Android

This commit is contained in:
Bill Thornton 2019-08-27 10:17:37 -04:00
parent 27e96b6a12
commit 9193d1c4e2

View File

@ -31,6 +31,10 @@ export default class HomeScreen extends React.Component {
}
onNavigationChange(navigation) {
if (!navigation.url) {
console.warn('No url provided to onNavigationChange', navigation);
return;
}
const url = Url.parse(navigation.url);
console.debug('navigationChange', navigation, url);
@ -166,7 +170,7 @@ const styles = StyleSheet.create({
flex: 1,
backgroundColor: Colors.backgroundColor,
// Padding for the StatusBar
paddingTop: Constants.statusBarHeight || 0
paddingTop: Platform.OS === 'ios' ? (Constants.statusBarHeight || 20) : StatusBar.currentHeight
},
loading: {
flex: 1,