-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android removeListeners implementation incorrect #567
Comments
I think you are correct - https://github.com/facebook/react-native/blob/4f1f42b0761bff7a68c85cae6de0c4c58c5031d5/Libraries/EventEmitter/NativeEventEmitter.js#L105 So it looks current code will be correct for the case where no listener has been added ever, or when listener count is > 0, but if listeners have been added and removed such that there should no longer be listeners, this will never work without counting and decrementing. I won't have time to repair this but if you can post a PR I can certainly merge it - thanks for noting it at minimum so that it is tracked now |
I created #569 |
🎉 This issue has been resolved in version 7.1.9 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I think count is the number of listeners to remove, so we need to track the number of listener and if the number of listeners is 0 then hasListener should be false
Originally posted by @Legion2 in #548 (comment)
The text was updated successfully, but these errors were encountered: