Fix pop method to properly refresh the navigatorBar
Summary: When using nativator.pop() the navigatorBar doesn't refresh properly if we change navigationBarHidden. When navigator.pop() is called, the navbar doesn't show up, even avec navigationBarHidden set back to true. See between Statusbar and Movie poster in the example below. ![bad](https://cloud.githubusercontent.com/assets/55496/8683849/77effa30-2a75-11e5-9f32-9be6fa87efac.gif) // Not actually updating the indices yet until we get the native // `onNavigationComplete`. updatingAllIndicesAtOrBeyond: null, https://github.com/facebook/react-native/blob/master/Libraries/Components/Navigation/NavigatorIOS.ios.js#L510-L512 The View need to be refreshed in pop method anyway. updatingAllIndicesAtOrBeyond: this.state.requestedTopOfStack - n, Now, navbar appears properly. ![good](https://cloud.githubusercontent.com/assets/55496/8683907/be9d2714-2a75-11e5-8fda-653e68869076.gif) Closes https://github.com/facebook/react-native/pull/1989 Reviewed By: svcscm Differential Revision: D2798515 Pulled By: androidtrunkagent fb-gh-sync-id: 9d554c9d88b87628488a8cebb7e3bbe4dd9c017d
This commit is contained in:
parent
2c39515557
commit
e62471b7c3
|
@ -492,9 +492,7 @@ var NavigatorIOS = React.createClass({
|
||||||
this.setState({
|
this.setState({
|
||||||
requestedTopOfStack: newRequestedTopOfStack,
|
requestedTopOfStack: newRequestedTopOfStack,
|
||||||
makingNavigatorRequest: true,
|
makingNavigatorRequest: true,
|
||||||
// Not actually updating the indices yet until we get the native
|
updatingAllIndicesAtOrBeyond: this.state.requestedTopOfStack - n,
|
||||||
// `onNavigationComplete`.
|
|
||||||
updatingAllIndicesAtOrBeyond: null,
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue