wix / react-native-ui-lib

UI Components Library for React Native
https://wix.github.io/react-native-ui-lib/
MIT License
6.57k stars 715 forks source link

Make Constants.statusBarHeight dynamic on phone orientation change #3256

Closed yovelovadia123 closed 2 months ago

yovelovadia123 commented 2 months ago

Description

When starting IOS application in landscape mode and then changing to portrait statusBarHeight value wont change and remain 0.

Changelog

inside Constants.ts made statusBarHeight dynamic to mobile orientation changes Instead of using StatusBarManager.HEIGHT, now setStatusBarHeight will use StatusBarManager.getHeight() method which provides the right height when called (HEIGHT is declared once when the app initialized)