Skip to content

Commit

Permalink
Merge pull request #1867 from nextcloud/backport/1865/stable20
Browse files Browse the repository at this point in the history
[stable20] Fix CallViewController present issue
  • Loading branch information
SystemKeeper authored Nov 6, 2024
2 parents 945e71b + 75a2a0b commit ca0ba1d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 3 additions & 1 deletion NextcloudTalk/NCRoomsManagerExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 3 additions & 4 deletions NextcloudTalk/NCSplitViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit ca0ba1d

Please sign in to comment.