mirror of
https://github.com/status-im/react-native.git
synced 2025-01-16 04:24:15 +00:00
a19c6991c0
Summary: On certain devices (in my case, any iPad Pro model), listening to `DeviceEventEmitter.didUpdateDimensions` would call back *before* the interface change takes places (i.e. calling `Dimensions.get()` in this callback would return wrong values). Turns out that we were listening for the wrong native event. Edit to add: now using `[RCTSharedApplication() statusBarOrientation]` to get the current orientation. Not yet sure why, but the `userInfo` provided by the notification was returning the wrong orientation *only* on the first time you rotate the device. This fixes the open issue: https://github.com/facebook/react-native/issues/7340 Closes https://github.com/facebook/react-native/pull/11350 Differential Revision: D4348186 Pulled By: javache fbshipit-source-id: cb2cfb9cccfc459ad4b46a5af2bec4c973132ae8