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
..
2016-10-14 08:13:55 -07:00
2016-11-04 05:43:44 -07:00
2016-10-11 10:14:28 -07:00
2016-11-04 05:43:44 -07:00
2016-10-12 19:28:42 -07:00
2016-11-04 05:43:44 -07:00
2016-11-04 05:43:44 -07:00
2016-11-02 12:29:15 -07:00
2016-08-09 06:43:46 -07:00
2016-11-04 18:43:42 -07:00
2016-11-08 12:43:48 -08:00
2016-11-04 05:43:44 -07:00
2016-11-04 05:43:44 -07:00
2016-11-08 12:43:48 -08:00
2016-11-08 12:43:48 -08:00
2016-07-25 03:43:29 -07:00
2016-08-09 06:43:46 -07:00
2016-11-04 05:43:44 -07:00
2016-08-12 07:28:38 -07:00