From 70f4ab3fab93ebde9019cc7942d5601ac3d2015c Mon Sep 17 00:00:00 2001 From: Igor Solomennikov Date: Thu, 7 Jul 2022 15:38:25 -0700 Subject: [PATCH] [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. --- .../AttachmentApproval/AttachmentPrepViewController.swift | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/SignalUI/ViewControllers/AttachmentApproval/AttachmentPrepViewController.swift b/SignalUI/ViewControllers/AttachmentApproval/AttachmentPrepViewController.swift index 648b7a5850..b178cc9c4f 100644 --- a/SignalUI/ViewControllers/AttachmentApproval/AttachmentPrepViewController.swift +++ b/SignalUI/ViewControllers/AttachmentApproval/AttachmentPrepViewController.swift @@ -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) {