Revert fixes since it didn't actually fix the problem

This commit is contained in:
naturecodevoid
2023-02-17 18:51:06 -08:00
parent 3605ca6422
commit c585c57965

View File

@@ -45,9 +45,7 @@ final class LaunchViewController: RSTLaunchViewController, UIDocumentPickerDeleg
// self.destinationViewController = self.storyboard!.instantiateViewController(withIdentifier: "tabBarController") as! TabBarController
let rootView = RootView()
.environment(\.managedObjectContext, DatabaseManager.shared.viewContext)
// NOTE: Injection/HMR can be done solely from the SwiftUI side of things, however, it crashes the app when editing a view inside another view (such as the dev mode menu). For some reason, injecting in UIKit *and* SwiftUI at the same time fixes this.
// However, it has one downside: if we inject in UIKit, the whole UI will reload whenever we save a change.
self.destinationViewController = Inject.ViewControllerHost(UIHostingController(rootView: rootView))
self.destinationViewController = UIHostingController(rootView: rootView)
}
super.viewDidLoad()
}