-1

Can I stop datasnapshot when my global boolean is true without waiting ending execution of listener and without limitToFirst. I have some verification in event listener because I need to verify some data and I need make ending in listener

Jake Lee
  • 7,549
  • 8
  • 45
  • 86

1 Answers1

3

You can remove the reference's listener with removeEventListener.

For example: ref.removeEventListener(listener);

ref = Reference you initially set the listener on.

listener = The listener (e.g. this if called within the listener).

Jake Lee
  • 7,549
  • 8
  • 45
  • 86