Skip to content
This repository was archived by the owner on May 26, 2019. It is now read-only.

Conversation

@aarkalyk
Copy link
Contributor

@aarkalyk aarkalyk commented Mar 5, 2018

Useful callback to know whether or not reportNewIncomingCall has succeeded and handle actions accordingly.

@aarkalyk aarkalyk force-pushed the display-incoming-call-callback branch from 6e2a4ee to 786d28a Compare March 5, 2018 11:57
index.js Outdated
RNCallKitDidDisplayIncomingCall,
(data) => { callback(data.error); }
));
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest that not adding listeners every time you call displayIncomingCall() as it would ended up having so many listeners without removing them. A better way to do this is just like how we add event listeners in addEventListener() function; users only need to register listener once and they can choose to remove listeners anytime they want, e.g. in componentWillUnmount().

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I'll fix it today.

@aarkalyk
Copy link
Contributor Author

@ianlin Please, review :)

@ianlin ianlin merged commit af8dd00 into react-native-webrtc:master Apr 2, 2018
@aarkalyk aarkalyk deleted the display-incoming-call-callback branch July 7, 2018 11:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants