diff --git a/NextcloudTalk/NCRoomsManagerExtensions.swift b/NextcloudTalk/NCRoomsManagerExtensions.swift index 541941701..48ac92b09 100644 --- a/NextcloudTalk/NCRoomsManagerExtensions.swift +++ b/NextcloudTalk/NCRoomsManagerExtensions.swift @@ -24,8 +24,10 @@ import Foundation // Check if we try to join a room, we're still trying to leave if self.isLeavingRoom(withToken: token) { - self.leavingRoomToken = nil self.leaveRoomTask?.cancel() + + self.leaveRoomTask = nil + self.leavingRoomToken = nil } self.joinRoomHelper(token, forCall: call) diff --git a/NextcloudTalk/NCSplitViewController.swift b/NextcloudTalk/NCSplitViewController.swift index 3bc19101e..5a0f1a6e8 100644 --- a/NextcloudTalk/NCSplitViewController.swift +++ b/NextcloudTalk/NCSplitViewController.swift @@ -67,10 +67,9 @@ } override func present(_ viewControllerToPresent: UIViewController, animated flag: Bool, completion: (() -> Void)? = nil) { - self.internalExecuteAfterTransition { - if !viewControllerToPresent.isBeingPresented { - super.present(viewControllerToPresent, animated: flag, completion: completion) - } + // Don't use internalExecuteAfterTransition here as that might interfere with presenting the CallViewController from CallKit/Background + if !viewControllerToPresent.isBeingPresented { + super.present(viewControllerToPresent, animated: flag, completion: completion) } }