react-native/React/Modules
Mani Ghasemlou a19c6991c0 Fix for dimensions not updating correctly on iPad due to screen rotation
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
2016-12-19 14:58:54 -08:00
..
JSCSamplingProfiler.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
JSCSamplingProfiler.m Fixing a missing colon 2016-11-15 11:17:49 -08:00
RCTAccessibilityManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTAccessibilityManager.m Update RCTNetworking, RCTNetInfo and RCTLocationManager to use new events system 2016-05-25 04:28:36 -07:00
RCTAlertManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTAlertManager.m Fix Alert memory leak 2016-10-25 17:28:49 -07:00
RCTAppState.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTAppState.m iOS: Provide correct initial value for AppState.currentState 2016-07-12 23:28:22 -07:00
RCTAsyncLocalStorage.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTAsyncLocalStorage.m Enforcing semi-colon consistency between dev and release modes when calling RCTLog* 2016-11-16 07:28:32 -08:00
RCTClipboard.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTClipboard.m Minor fixes to clipboard and Linking to remove TODOs 2016-02-10 12:25:51 -08:00
RCTDevLoadingView.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTDevLoadingView.m Show packager progress in UI 2016-10-13 11:43:41 -07:00
RCTDevMenu.h fixing shake to open Dev Menu only work once 2016-11-29 13:43:31 -08:00
RCTDevMenu.m Rename and merge files for RCTWebSocketObserver protocol 2016-12-08 07:44:37 -08:00
RCTEventEmitter.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTEventEmitter.m Use new enqueueJSCall method everywhere 2016-08-02 11:14:06 -07:00
RCTExceptionsManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTExceptionsManager.m Remove deprecated RCTReloadNotification 2016-12-07 16:28:33 -08:00
RCTI18nManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTI18nManager.m Provide forceRTL for LTR language to test 2016-08-04 12:28:30 -07:00
RCTI18nUtil.h Provide forceRTL for LTR language to test 2016-08-04 12:28:30 -07:00
RCTI18nUtil.m enable RTL layout by default for all apps 2016-09-06 17:58:47 -07:00
RCTKeyboardObserver.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTKeyboardObserver.m Apple TV support 1: existing Objective C code should compile for tvOS 2016-09-27 06:28:33 -07:00
RCTRedBox.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTRedBox.m Remove deprecated RCTReloadNotification 2016-12-07 16:28:33 -08:00
RCTSourceCode.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTSourceCode.m Cleanup RCTSourceCode 2016-11-18 05:13:31 -08:00
RCTStatusBarManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTStatusBarManager.m Travis CI reliability fixes: preload package manager and increase tim… 2016-10-16 15:43:44 -07:00
RCTTVNavigationEventEmitter.h Apple TV support 4: support for input (tvOS focus engine) 2016-12-19 06:28:40 -08:00
RCTTVNavigationEventEmitter.m Apple TV support 4: support for input (tvOS focus engine) 2016-12-19 06:28:40 -08:00
RCTTiming.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTTiming.m remove incorrect `__unused` modifier 2016-09-06 02:43:40 -07:00
RCTUIManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTUIManager.m Fix for dimensions not updating correctly on iPad due to screen rotation 2016-12-19 14:58:54 -08:00