chariotsolutions / phonegap-nfc

PhoneGap NFC Plugin
MIT License
706 stars 556 forks source link

Quick and simple question: addNdefFormatableListener doesn't have a equivalent removeNdefFormatableListener? #290

Closed mm108 closed 6 years ago

mm108 commented 6 years ago

All the add listeners have equivalent remove methods, except for this one: nfc.addNdefFormatableListener

Is there a reason not to have the remove method for this? So calling this method again is ok? Cos cannot remove before adding the listener again :) And thanks for the fantastic plugin :+1: Cheers

don commented 6 years ago

I think removing listeners is a bad idea and don't recommend it. I suggest ignoring messages that you don't care about rather than removing and adding listeners.

It's an oversight that there is no removeNdefFormatableListener. The remove code was contributed, I guess the author didn't need that. You could look at #270 to see if it's implemented there. If not feel free to submit a pull request.