mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Cleanup how we setup the CallKit provider and have it be used for outgoing calls as well (#2967)
- tear down ElementCall screens when ending the call from the CXCallController - make the call UI available in the task manager and lock screen - Fix broken hang up widget message format
This commit is contained in:
@@ -168,6 +168,18 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol {
|
||||
}
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
|
||||
elementCallService.actions
|
||||
.receive(on: DispatchQueue.main)
|
||||
.sink { [weak self] action in
|
||||
switch action {
|
||||
case .startCall:
|
||||
break
|
||||
case .endCall:
|
||||
self?.dismissCallScreenIfNeeded()
|
||||
}
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
}
|
||||
|
||||
func start() {
|
||||
@@ -569,6 +581,14 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol {
|
||||
presentCallScreen(roomProxy: roomProxy)
|
||||
}
|
||||
|
||||
private func dismissCallScreenIfNeeded() {
|
||||
guard navigationSplitCoordinator.sheetCoordinator is CallScreenCoordinator else {
|
||||
return
|
||||
}
|
||||
|
||||
navigationSplitCoordinator.setSheetCoordinator(nil)
|
||||
}
|
||||
|
||||
// MARK: Secure backup confirmation
|
||||
|
||||
private func presentSecureBackupLogoutConfirmationScreen() {
|
||||
|
||||
Reference in New Issue
Block a user