File tree 1 file changed +5
-4
lines changed
iOS/RCTCallDetection/RCTCallDetection
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ @interface CallDetectionManager()
16
16
@property (strong , nonatomic ) RCTResponseSenderBlock block;
17
17
@property (strong , nonatomic ) CXCallObserver * callObserver;
18
18
19
+ @end
19
20
@implementation CallDetectionManager
20
21
21
22
- (NSArray <NSString *> *)supportedEvents {
@@ -49,16 +50,16 @@ + (BOOL)requiresMainQueueSetup {
49
50
}
50
51
51
52
- (void )callObserver : (CXCallObserver *)callObserver callChanged : (CXCall *)call {
52
- if (call.hasEnded === true ) {
53
+ if (call.hasEnded == true ) {
53
54
[self sendEventWithName: @" PhoneCallStateUpdate" body: @" Disconnected" ];
54
55
}
55
- if (call.isOutgoing === true && call.hasConnected === false ) {
56
+ if (call.isOutgoing == true && call.hasConnected == false && call. hasEnded == false ) {
56
57
[self sendEventWithName: @" PhoneCallStateUpdate" body: @" Dialing" ];
57
58
}
58
- if (call.isOutgoing === false && call.hasConnected = == false ) {
59
+ if (call.isOutgoing == false && call.hasConnected == false ) {
59
60
[self sendEventWithName: @" PhoneCallStateUpdate" body: @" Incoming" ];
60
61
}
61
- if (call.hasEnded === false && call.hasConnected = == true ) {
62
+ if (call.hasEnded == false && call.hasConnected == true ) {
62
63
[self sendEventWithName: @" PhoneCallStateUpdate" body: @" Connected" ];
63
64
}
64
65
}
You can’t perform that action at this time.
0 commit comments