diff --git a/app/components/safe_area_view/__snapshots__/safe_area_view.ios.test.js.snap b/app/components/safe_area_view/__snapshots__/safe_area_view.ios.test.js.snap index de2a8784e..4aef1154f 100644 --- a/app/components/safe_area_view/__snapshots__/safe_area_view.ios.test.js.snap +++ b/app/components/safe_area_view/__snapshots__/safe_area_view.ios.test.js.snap @@ -11,7 +11,7 @@ exports[`SafeAreaIos should match snapshot 1`] = ` } } > - { if (this.mounted) { - this.setState({statusBarHeight: statusBarFrameData.height}); + if (statusBarFrameData.height === 0) { + this.hideTopBar(); + } else { + this.showTopBar(); + } } }, ); @@ -141,12 +146,26 @@ export default class SafeAreaIos extends PureComponent { this.setState({keyboard: true}); }; - renderTopBar = () => { - const {safeAreaInsets, statusBarHeight} = this.state; - const {headerComponent, excludeHeader, forceTop, navBarBackgroundColor, theme} = this.props; - const hideTopBar = excludeHeader || !statusBarHeight; + hideTopBar = () => { + Animated.timing(this.topBarHeight, { + toValue: 10, + duration: 350, + useNativeDriver: false, + }).start(); + } - if (hideTopBar) { + showTopBar = () => { + Animated.timing(this.topBarHeight, { + toValue: this.state.safeAreaInsets.top, + duration: 350, + useNativeDriver: false, + }).start(); + } + + renderTopBar = () => { + const {headerComponent, excludeHeader, navBarBackgroundColor, theme} = this.props; + + if (excludeHeader) { return null; } @@ -155,30 +174,25 @@ export default class SafeAreaIos extends PureComponent { topColor = navBarBackgroundColor; } - let top = safeAreaInsets.top; - if (forceTop && DeviceTypes.IS_IPHONE_WITH_INSETS && !hideTopBar) { - top = forceTop; - } - if (headerComponent) { return ( - {headerComponent} - + ); } return ( - diff --git a/app/screens/long_post/__snapshots__/long_post.test.js.snap b/app/screens/long_post/__snapshots__/long_post.test.js.snap index 8224117f1..a2270fd17 100644 --- a/app/screens/long_post/__snapshots__/long_post.test.js.snap +++ b/app/screens/long_post/__snapshots__/long_post.test.js.snap @@ -221,7 +221,6 @@ LongPost { backgroundColor="transparent" excludeHeader={true} footerColor="transparent" - forceTop={44} >