From e0eba95b4897d78d82dd9b7591e0c4eef2a1be84 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Tue, 25 Apr 2023 18:51:46 -0400 Subject: [PATCH] Remove double navigation controllers from compose screen --- Tusker/Scenes/ComposeSceneDelegate.swift | 3 +-- Tusker/TuskerNavigationDelegate.swift | 15 +-------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/Tusker/Scenes/ComposeSceneDelegate.swift b/Tusker/Scenes/ComposeSceneDelegate.swift index 517e7da7..33dcf4fa 100644 --- a/Tusker/Scenes/ComposeSceneDelegate.swift +++ b/Tusker/Scenes/ComposeSceneDelegate.swift @@ -61,10 +61,9 @@ class ComposeSceneDelegate: UIResponder, UIWindowSceneDelegate, TuskerSceneDeleg let composeVC = ComposeHostingController(draft: draft, mastodonController: controller) composeVC.delegate = self - let nav = EnhancedNavigationViewController(rootViewController: composeVC) window = UIWindow(windowScene: windowScene) - window!.rootViewController = nav + window!.rootViewController = composeVC window!.makeKeyAndVisible() updateTitle(draft: composeVC.controller.draft) diff --git a/Tusker/TuskerNavigationDelegate.swift b/Tusker/TuskerNavigationDelegate.swift index f2f86b1c..b4b0d82f 100644 --- a/Tusker/TuskerNavigationDelegate.swift +++ b/Tusker/TuskerNavigationDelegate.swift @@ -103,21 +103,8 @@ extension TuskerNavigationDelegate { presentDuckable(compose, animated: animated, isDucked: isDucked) { return } else { - let nav = UINavigationController(rootViewController: compose) - // TODO: is this still necessary? -// nav.presentationController?.delegate = compose - present(nav, animated: animated) + present(compose, animated: animated) } -// let compose = ComposeHostingController(draft: draft, mastodonController: apiController) -// if #available(iOS 16.0, *), -// presentDuckable(compose, animated: animated, isDucked: isDucked) { -// return -// } else { -// let compose = ComposeHostingController(draft: draft, mastodonController: apiController) -// let nav = UINavigationController(rootViewController: compose) -// nav.presentationController?.delegate = compose -// present(nav, animated: animated) -// } } }