summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSajad Vishkai <sajaclvishkai@gmail.com>2022-09-26 11:54:33 +0200
committerAndrej Mihajlov <and@mullvad.net>2022-09-26 16:31:21 +0200
commit02d7863104a44e63427d3df0fa1b00e429f6ff2a (patch)
treeba19e95354e38b1b5e05deb278d07a06cb76c2b9
parentf5293ba002bbd71e8d9ea92ff7caa06678d5caae (diff)
downloadmullvadvpn-02d7863104a44e63427d3df0fa1b00e429f6ff2a.tar.xz
mullvadvpn-02d7863104a44e63427d3df0fa1b00e429f6ff2a.zip
Update SceneDelegate.swift
-rw-r--r--ios/MullvadVPN/SceneDelegate.swift19
1 files changed, 5 insertions, 14 deletions
diff --git a/ios/MullvadVPN/SceneDelegate.swift b/ios/MullvadVPN/SceneDelegate.swift
index 1372fa5260..6e972ae975 100644
--- a/ios/MullvadVPN/SceneDelegate.swift
+++ b/ios/MullvadVPN/SceneDelegate.swift
@@ -128,17 +128,14 @@ class SceneDelegate: UIResponder {
}
@objc private func sceneDidEnterBackground() {
- if #available(iOS 13, *) {
- let appDelegate = UIApplication.shared.delegate as? AppDelegate
-
- appDelegate?.scheduleBackgroundTasks()
- }
+ let appDelegate = UIApplication.shared.delegate as? AppDelegate
+
+ appDelegate?.scheduleBackgroundTasks()
}
}
// MARK: - UIWindowSceneDelegate
-@available(iOS 13.0, *)
extension SceneDelegate: UIWindowSceneDelegate {
func scene(
_ scene: UIScene,
@@ -333,10 +330,7 @@ extension SceneDelegate {
modalRootContainer.preferredContentSize = CGSize(width: 480, height: 600)
modalRootContainer.modalPresentationStyle = .formSheet
modalRootContainer.presentationController?.delegate = self
-
- if #available(iOS 13.0, *) {
- modalRootContainer.isModalInPresentation = true
- }
+ modalRootContainer.isModalInPresentation = true
if modalRootContainer.presentingViewController == nil {
rootContainer.present(modalRootContainer, animated: animated)
@@ -440,9 +434,7 @@ extension SceneDelegate {
if UIDevice.current.userInterfaceIdiom == .pad {
controller.modalPresentationStyle = .formSheet
- if #available(iOS 13.0, *) {
- controller.isModalInPresentation = true
- }
+ controller.isModalInPresentation = true
}
controller.completionHandler = { controller in
@@ -986,7 +978,6 @@ struct ClassicWindowFactory: WindowFactory {
}
}
-@available(iOS 13.0, *)
struct SceneWindowFactory: WindowFactory {
let windowScene: UIWindowScene