diff --git a/SessionUIKit/Utilities/SwiftUI+Utilities.swift b/SessionUIKit/Utilities/SwiftUI+Utilities.swift index 70d7d39b0..de21ef6c5 100644 --- a/SessionUIKit/Utilities/SwiftUI+Utilities.swift +++ b/SessionUIKit/Utilities/SwiftUI+Utilities.swift @@ -23,21 +23,6 @@ extension EnvironmentValues { } } -extension UIViewController { - public func present(style: UIModalPresentationStyle = .automatic, @ViewBuilder builder: () -> Content) { - let toPresent = UIHostingController(rootView: AnyView(EmptyView())) - toPresent.modalPresentationStyle = style - toPresent.rootView = AnyView( - builder() - .environment(\.viewController, toPresent) - ) - NotificationCenter.default.addObserver(forName: Notification.Name(rawValue: "dismissModal"), object: nil, queue: nil) { [weak toPresent] _ in - toPresent?.dismiss(animated: true, completion: nil) - } - self.present(toPresent, animated: true, completion: nil) - } -} - public struct UIView_SwiftUI: UIViewRepresentable { public typealias UIViewType = UIView