This repository was archived by the owner on Oct 2, 2019. It is now read-only.
This repository was archived by the owner on Oct 2, 2019. It is now read-only.
Notification when calls array is ready even it's empty #207
Open
Description
Learned from feedback from mozilla app developers, there needs a way to tell if the calls array is ready even the calls array is empty. Otherwise, how can they differentiate telephony.calls giving us an empty array because it's not ready from telephony.calls or giving us an empty array because there is no call?
The mozilla's solution is making use of the 'callschanged' event. We could just guarantee that every time app registers an oncallschanged listener, they are guaranteed to get a callback at some point. If the calls array has loaded then the app will get the event on the next tick. If the array hasn't loaded yet then the app will get the event as soon as it has.
Metadata
Metadata
Assignees
Labels
No labels