Skip to content
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
@hsinyi

Description

@hsinyi

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions