Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PushNotificationIOS: Use PushNotificationEventName as the key to stor…
…e 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 #10776 Differential Revision: D4168722 Pulled By: hramos fbshipit-source-id: d68581428d2acde314f7b5333feafe1ec7807159
- Loading branch information