[Media Editor] Do not wrap image editing tool VCs in a nav controller.

Two VCs: photo editor and crop view don't need a UINavigationController
and are fine presented as is.

Also remove unused `completion` parameter.
This commit is contained in:
Igor Solomennikov 2022-07-07 15:38:25 -07:00
parent b9d3992323
commit 70f4ab3fab

View File

@ -205,16 +205,14 @@ public class AttachmentPrepViewController: OWSViewController {
}
}
private func presentFullScreen(viewController: UIViewController, completion: (() -> Void)? = nil) {
private func presentFullScreen(viewController: UIViewController) {
if let presentedViewController = presentedViewController {
owsAssertDebug(false, "Already has presented view controller. [\(presentedViewController)]")
presentedViewController.dismiss(animated: false)
}
let navigationController = OWSNavigationController(rootViewController: viewController)
navigationController.modalPresentationStyle = .fullScreen
navigationController.setNavigationBarHidden(true, animated: false)
presentFullScreen(navigationController, animated: false, completion: completion)
viewController.modalPresentationStyle = .fullScreen
presentFullScreen(viewController, animated: false)
}
final func presentMediaTool(viewController: UIViewController) {