18f38ecdc0
Summary:This adds a `HEIGHT` constant on `StatusBar` on Android. I needed only this for now but I will work on a better status bar dimensions API later (see TODO). It also improves the implementation to fix a bug that happened when multiple `StatusBar` components get updated in the same frame as well as remove useless calls to the `StatusBarModule` when values did not change. Instead of calling the `StatusBarManager` immediately when the component gets updated and relying on the order of the calls that get dispatched to native we now wait at the end of the frame to send the calls to the `StatusBarManager` using `setImmediate`. To make this work properly we need to change the data structure of the props stack a little bit to store the desired transition/animation too for each value. Finally this updates the example to only show the ones that work for the current platform. **Test plan** In the UIExplorer Example, in the 'StatusBar dimensions' section it should show 25 for the height of the status bar. A Closes https://github.com/facebook/react-native/pull/6195 Differential Revision: D3017559 fb-gh-sync-id: d6f4c6a72a2dfde83496ecc0f56dca4abaf3055e shipit-source-id: d6f4c6a72a2dfde83496ecc0f56dca4abaf3055e |
||
---|---|---|
.. | ||
StatusBar.js | ||
StatusBarIOS.android.js | ||
StatusBarIOS.ios.js |