Skip to content

Commit 4298b98

Browse files
author
Doug Watkins
committed
Fixed missed commit
1 parent 16ccd59 commit 4298b98

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

iOS/RCTCallDetection/RCTCallDetection/CallDetectionManager.m

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ @interface CallDetectionManager()
1616
@property(strong, nonatomic) RCTResponseSenderBlock block;
1717
@property(strong, nonatomic) CXCallObserver* callObserver;
1818

19+
@end
1920
@implementation CallDetectionManager
2021

2122
- (NSArray<NSString *> *)supportedEvents {
@@ -49,16 +50,16 @@ + (BOOL)requiresMainQueueSetup {
4950
}
5051

5152
- (void)callObserver:(CXCallObserver *)callObserver callChanged:(CXCall *)call {
52-
if (call.hasEnded === true) {
53+
if (call.hasEnded == true) {
5354
[self sendEventWithName:@"PhoneCallStateUpdate" body:@"Disconnected"];
5455
}
55-
if (call.isOutgoing === true && call.hasConnected === false) {
56+
if (call.isOutgoing == true && call.hasConnected == false && call.hasEnded == false) {
5657
[self sendEventWithName:@"PhoneCallStateUpdate" body:@"Dialing"];
5758
}
58-
if (call.isOutgoing === false && call.hasConnected === false) {
59+
if (call.isOutgoing == false && call.hasConnected == false) {
5960
[self sendEventWithName:@"PhoneCallStateUpdate" body:@"Incoming"];
6061
}
61-
if (call.hasEnded === false && call.hasConnected === true) {
62+
if (call.hasEnded == false && call.hasConnected == true) {
6263
[self sendEventWithName:@"PhoneCallStateUpdate" body:@"Connected"];
6364
}
6465
}

0 commit comments

Comments
 (0)