You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
I'd agree with how you put it on the second sentence. Do you expect that the 'callschanged' event contain the call array (sequence)? It is expected to be a short array.
In Mozilla's design, callschanged event type is TelephonyEvent containing a nullable TelephonyCall object. In the case of notifying calls array is ready, the callschanged event isn't carrying a call. Having a simple notification in the case should be fine.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The text was updated successfully, but these errors were encountered: