Remove double navigation controllers from compose screen

This commit is contained in:
Shadowfacts 2023-04-25 18:51:46 -04:00
parent 2febb37a8e
commit e0eba95b48
2 changed files with 2 additions and 16 deletions

View File

@ -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)

View File

@ -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)
// }
}
}