mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-21 23:22:08 +02:00
Declined calls now properly reset call view controller
Signed-off-by: Marco Festini <marco.festini@awesome-technologies.de>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user