Fixed crash on iOS

This commit is contained in:
Arnaud Vergnet 2020-04-19 15:03:40 +02:00
parent 9eb925d1a1
commit 759c369c93

View file

@ -14,12 +14,13 @@ export const withCollapsible = (Component: any) => {
progress,
opacity,
} = useCollapsibleStack();
const statusbarHeight = StatusBar.currentHeight != null ? StatusBar.currentHeight : 0;
return <Component
collapsibleStack={{
onScroll,
onScrollWithListener,
containerPaddingTop: containerPaddingTop - StatusBar.currentHeight,
scrollIndicatorInsetTop: scrollIndicatorInsetTop - StatusBar.currentHeight,
containerPaddingTop: containerPaddingTop - statusbarHeight,
scrollIndicatorInsetTop: scrollIndicatorInsetTop - statusbarHeight,
translateY,
progress,
opacity,