react-native/Libraries
ianlin e51cb349ce PushNotificationIOS: Use PushNotificationEventName as the key to store in the handler map
Summary:
If we are using the same handler for different events, e.g. both `notification` and `localNotification` use `_onNotification()` handler, the former listener stored in `_notifHandlers` would be overridden by the latter so it's impossible to remove the `notification` listener when we call `removeEventListener`.

This PR stores the listeners by using `pushNotificationEventName` (notification, localNotification, register or registrationError) as the key.

Use the same handler for `notification` and `localNotification`, both listeners will be removed when calling `removeEventListener`.
Closes https://github.com/facebook/react-native/pull/10776

Differential Revision: D4168722

Pulled By: hramos

fbshipit-source-id: d68581428d2acde314f7b5333feafe1ec7807159
2016-11-14 12:58:32 -08:00
..
ART RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
ActionSheetIOS ActionSheetIOS - Pass URL, not file contents to UIActivityViewController for file URLs. 2016-09-06 04:43:36 -07:00
AdSupport Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
Alert fix typo in Alert.js 2016-10-14 08:13:55 -07:00
Animated TouchableOpacity: Respond instantly to first touch 2016-11-14 09:43:34 -08:00
AppState Remove deprecated APIs and modules 2016-10-11 07:43:52 -07:00
BatchedBridge Reorganize core JS files 2016-10-11 10:14:28 -07:00
BugReporting RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
CameraRoll Update file for Markdown link syntax 2016-10-16 15:28:42 -07:00
Components relativeKeyboardHeight works wrong in some cases 2016-11-14 11:58:58 -08:00
Core Fix symbolication on stack trace with whatwg-fetch as a dependency 2016-11-14 09:13:40 -08:00
CustomComponents Android: Reduce overdraw layers by hiding cards when they are not visible 2016-11-14 08:59:24 -08:00
DebugComponentHierarchy Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
EventEmitter Cleanup: Remove `@typechecks` 2016-10-12 19:28:42 -07:00
Experimental enable variable size slideoutView with swipeableListView 2016-11-14 11:58:58 -08:00
Geolocation Set allowsBackgroundLocationUpdates as necessary when using location … 2016-11-14 11:58:58 -08:00
Image Remove underline colour in Android text inputs 2016-11-04 14:58:46 -07:00
Inspector RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
Interaction RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
JSInspector Add Network agent 2016-11-02 12:29:15 -07:00
LayoutAnimation RN: Stop Deep Linking `ReactPropTypes` 2016-10-14 18:59:10 -07:00
Linking Auto-fix lint errors 2016-08-09 06:43:46 -07:00
LinkingIOS Remove deprecated APIs and modules 2016-10-11 07:43:52 -07:00
Modal update Modal.js to fix #10662 2016-11-04 18:43:42 -07:00
NativeAnimation Add extractOffset to Animated 2016-11-07 20:43:37 -08:00
NavigationExperimental Fixed the issue that _onTransitionEnd might try to setState at unmoun… 2016-11-11 09:43:48 -08:00
Network Update fbsource 2016-11-08 12:43:48 -08:00
Performance RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
PermissionsAndroid Docs fix: remove confusing typo 2016-09-19 14:46:12 -07:00
PushNotificationIOS PushNotificationIOS: Use PushNotificationEventName as the key to store in the handler map 2016-11-14 12:58:32 -08:00
RCTTest Travis CI reliability fixes: preload package manager and increase tim… 2016-10-16 15:43:44 -07:00
ReactNative Update fbsource 2016-11-08 12:43:48 -08:00
Renderer Update fbsource 2016-11-08 12:43:48 -08:00
Sample Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
Settings Apple TV support 2: Xcode projects and CI (scripts/objc-test.sh) 2016-10-05 07:28:44 -07:00
Share Add Share module 2016-07-25 03:43:29 -07:00
Storage Auto-fix lint errors 2016-08-09 06:43:46 -07:00
StyleSheet RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
Text Remove FlowFixMe from TextStylePropTypes 2016-11-10 08:58:41 -08:00
Utilities FIX: Call all android back key handlers before invoking default 2016-11-11 00:28:40 -08:00
Vibration Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
WebSocket ios:websocket:exectuor : Grab port from Bundle URL 2016-10-12 08:43:37 -07:00
react-native RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
vendor Cleanup clear/set/throwImmediate 2016-08-12 07:28:38 -07:00
Promise.js Make onUnhandled safe for undefined errors 2016-08-02 07:58:28 -07:00
promiseRejectionIsError.js Add possibility to `console.error`/redbox on promise rejections 2016-03-15 05:22:22 -07:00