Skip to content

Commit 22a3f2d

Browse files
committed
Add missing call to _startCallActionEventListenerAdded on iOS to prevent outgoing call delay
1 parent 7c89f5e commit 22a3f2d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

actions.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,15 @@ const RNCallKeepDidPerformDTMFAction = 'RNCallKeepDidPerformDTMFAction';
1515
const RNCallKeepProviderReset = 'RNCallKeepProviderReset';
1616
const isIOS = Platform.OS === 'ios';
1717

18-
const didReceiveStartCallAction = handler =>
18+
const didReceiveStartCallAction = handler => {
1919
eventEmitter.addListener(RNCallKeepDidReceiveStartCallAction, (data) => handler(data));
2020

21+
if (isIOS) {
22+
// Tell CallKeep that we are ready to receive `RNCallKeepDidReceiveStartCallAction` event and prevent delay
23+
RNCallKeepModule._startCallActionEventListenerAdded();
24+
}
25+
};
26+
2127
const answerCall = handler =>
2228
eventEmitter.addListener(RNCallKeepPerformAnswerCallAction, (data) => handler(data));
2329

0 commit comments

Comments
 (0)