Skip to content

Commit a3a4760

Browse files
committed
minor fix.
1 parent 887580d commit a3a4760

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ export default class RNCallKit {
7070
static displayIncomingCall(uuid, handle, handleType = 'number', hasVideo = false, localizedCallerName?: String, callback) {
7171
if (Platform.OS !== 'ios') return;
7272
if (callback) {
73-
_callkitEventHandlers.set(callback, _RNCallKitEmitter.addListener(
73+
_callkitEventHandlers.set(
74+
callback,
75+
_RNCallKitEmitter.addListener(
7476
RNCallKitDidDisplayIncomingCall,
7577
(data) => { callback(data.error); }
7678
));

ios/RNCallKit/RNCallKit.m

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ - (void)dealloc
8585

8686
// Display the incoming call to the user
8787
RCT_EXPORT_METHOD(displayIncomingCall:(NSString *)uuidString
88-
handle:(NSString *)handle
89-
handleType:(NSString *)handleType
90-
hasVideo:(BOOL)hasVideo
88+
handle:(NSString *)handle
89+
handleType:(NSString *)handleType
90+
hasVideo:(BOOL)hasVideo
9191
localizedCallerName:(NSString * _Nullable)localizedCallerName)
9292
{
9393
#ifdef DEBUG
@@ -295,19 +295,19 @@ + (BOOL)application:(UIApplication *)application
295295
NSLog(@"[RNCallKit][application:openURL]");
296296
#endif
297297
/*
298-
NSString *handle = [url startCallHandle];
299-
if (handle != nil && handle.length > 0 ){
300-
NSDictionary *userInfo = @{
301-
@"handle": handle,
302-
@"video": @NO
303-
};
304-
[[NSNotificationCenter defaultCenter] postNotificationName:RNCallKitHandleStartCallNotification
305-
object:self
306-
userInfo:userInfo];
307-
return YES;
308-
}
309-
return NO;
310-
*/
298+
NSString *handle = [url startCallHandle];
299+
if (handle != nil && handle.length > 0 ){
300+
NSDictionary *userInfo = @{
301+
@"handle": handle,
302+
@"video": @NO
303+
};
304+
[[NSNotificationCenter defaultCenter] postNotificationName:RNCallKitHandleStartCallNotification
305+
object:self
306+
userInfo:userInfo];
307+
return YES;
308+
}
309+
return NO;
310+
*/
311311
return YES;
312312
}
313313

0 commit comments

Comments
 (0)