Declined calls now properly reset call view controller

Signed-off-by: Marco Festini <marco.festini@awesome-technologies.de>
This commit is contained in:
Marco Festini
2020-04-08 04:05:57 +02:00
parent 40b673ffaa
commit 2f1780602f
2 changed files with 18 additions and 0 deletions
+1
View File
@@ -13,6 +13,7 @@ Improvements:
* Verification by DM: Support QR code (#2921).
* Cross-Signing: Detect and expose new sign-ins (#2918).
* Cross-signing: Complete security at the end of sign in process( #3003).
* CallVC: Declined calls now properly reset call view controller (#2877).
Changes in 0.10.5 (2020-04-01)
===============================================
+17
View File
@@ -3258,6 +3258,7 @@ NSString *const AppDelegateDidValidateEmailNotificationClientSecretKey = @"AppDe
}];
}
__weak typeof(self) weakSelf = self;
if (mxCall.isIncoming && isCallKitEnabled)
{
// Let's CallKit display the system incoming call screen
@@ -3278,6 +3279,16 @@ NSString *const AppDelegateDidValidateEmailNotificationClientSecretKey = @"AppDe
NSLog(@"[AppDelegate] presentCallViewController");
[self presentCallViewController:NO completion:nil];
}
else if (call.state == MXCallStateEnded)
{
// Set call vc to nil to let our app handle new incoming calls even it wasn't killed by the system
if (weakSelf)
{
typeof(self) self = weakSelf;
[self dismissCallViewController:self->currentCallViewController completion:nil];
}
}
}];
}
else
@@ -3991,6 +4002,12 @@ NSString *const AppDelegateDidValidateEmailNotificationClientSecretKey = @"AppDe
}];
}
else
{
// Release properly
[currentCallViewController destroy];
currentCallViewController = nil;
}
}
}