diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2023-08-09 12:28:23 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2023-08-10 13:25:13 +0200 |
| commit | f8d4458021ea7cc6014689c35dc2fe06308c588a (patch) | |
| tree | d0fdbaf82bbd99b80e00aa4dd6dc8b585cd4e509 | |
| parent | 67857f85560c3efd745873244bfc81298d7b9a77 (diff) | |
| download | mullvadvpn-f8d4458021ea7cc6014689c35dc2fe06308c588a.tar.xz mullvadvpn-f8d4458021ea7cc6014689c35dc2fe06308c588a.zip | |
Remove iOS 13 code
9 files changed, 13 insertions, 49 deletions
diff --git a/ios/MullvadVPN/AppDelegate.swift b/ios/MullvadVPN/AppDelegate.swift index f1da222e3d..0cb57e863b 100644 --- a/ios/MullvadVPN/AppDelegate.swift +++ b/ios/MullvadVPN/AppDelegate.swift @@ -485,10 +485,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void ) { - if #available(iOS 14.0, *) { - completionHandler([.list, .banner, .sound]) - } else { - completionHandler([.sound, .alert]) - } + completionHandler([.list, .banner, .sound]) } } diff --git a/ios/MullvadVPN/Containers/Navigation/UINavigationBar+Appearance.swift b/ios/MullvadVPN/Containers/Navigation/UINavigationBar+Appearance.swift index 8d98f6cef4..5f69286878 100644 --- a/ios/MullvadVPN/Containers/Navigation/UINavigationBar+Appearance.swift +++ b/ios/MullvadVPN/Containers/Navigation/UINavigationBar+Appearance.swift @@ -62,19 +62,10 @@ extension UINavigationBar { navigationBarAppearance.doneButtonAppearance = doneBarButtonAppearance navigationBarAppearance.backButtonAppearance = backButtonAppearance - if #available(iOS 14, *) { - navigationBarAppearance.setBackIndicatorImage( - backIndicatorImage, - transitionMaskImage: backIndicatorTransitionMask - ) - } else { - // Bug: on iOS 13 setBackIndicatorImage accepts parameters in backward order - // https://stackoverflow.com/a/58171229/351305 - navigationBarAppearance.setBackIndicatorImage( - backIndicatorTransitionMask, - transitionMaskImage: backIndicatorImage - ) - } + navigationBarAppearance.setBackIndicatorImage( + backIndicatorImage, + transitionMaskImage: backIndicatorTransitionMask + ) return navigationBarAppearance } diff --git a/ios/MullvadVPN/Notifications/UI/NotificationBannerView.swift b/ios/MullvadVPN/Notifications/UI/NotificationBannerView.swift index 1ff4ee0c14..32449fa59d 100644 --- a/ios/MullvadVPN/Notifications/UI/NotificationBannerView.swift +++ b/ios/MullvadVPN/Notifications/UI/NotificationBannerView.swift @@ -17,10 +17,7 @@ final class NotificationBannerView: UIView { textLabel.textColor = UIColor.InAppNotificationBanner.titleColor textLabel.numberOfLines = 0 textLabel.lineBreakMode = .byWordWrapping - if #available(iOS 14.0, *) { - // See: https://stackoverflow.com/q/46200027/351305 - textLabel.lineBreakStrategy = [] - } + textLabel.lineBreakStrategy = [] return textLabel }() @@ -30,10 +27,7 @@ final class NotificationBannerView: UIView { textLabel.textColor = UIColor.InAppNotificationBanner.bodyColor textLabel.numberOfLines = 0 textLabel.lineBreakMode = .byWordWrapping - if #available(iOS 14.0, *) { - // See: https://stackoverflow.com/q/46200027/351305 - textLabel.lineBreakStrategy = [] - } + textLabel.lineBreakStrategy = [] return textLabel }() diff --git a/ios/MullvadVPN/View controllers/AccountDeletion/AccountDeletionContentView.swift b/ios/MullvadVPN/View controllers/AccountDeletion/AccountDeletionContentView.swift index 5dbbd3ca4c..51fcc42161 100644 --- a/ios/MullvadVPN/View controllers/AccountDeletion/AccountDeletionContentView.swift +++ b/ios/MullvadVPN/View controllers/AccountDeletion/AccountDeletionContentView.swift @@ -165,10 +165,7 @@ class AccountDeletionContentView: UIView { label.textColor = .red label.setContentHuggingPriority(.defaultLow, for: .horizontal) label.setContentCompressionResistancePriority(.defaultLow, for: .horizontal) - if #available(iOS 14.0, *) { - // See: https://stackoverflow.com/q/46200027/351305 - label.lineBreakStrategy = [] - } + label.lineBreakStrategy = [] return label }() diff --git a/ios/MullvadVPN/View controllers/CreationAccount/Welcome/WelcomeContentView.swift b/ios/MullvadVPN/View controllers/CreationAccount/Welcome/WelcomeContentView.swift index 73b06e6cf7..3154a0f3d5 100644 --- a/ios/MullvadVPN/View controllers/CreationAccount/Welcome/WelcomeContentView.swift +++ b/ios/MullvadVPN/View controllers/CreationAccount/Welcome/WelcomeContentView.swift @@ -94,9 +94,7 @@ final class WelcomeContentView: UIView { label.textColor = .white label.numberOfLines = .zero label.lineBreakMode = .byWordWrapping - if #available(iOS 14.0, *) { - label.lineBreakStrategy = [] - } + label.lineBreakStrategy = [] label.text = NSLocalizedString( "WELCOME_PAGE_DESCRIPTION", tableName: "Welcome", diff --git a/ios/MullvadVPN/View controllers/DeviceList/DeviceManagementContentView.swift b/ios/MullvadVPN/View controllers/DeviceList/DeviceManagementContentView.swift index da010ad687..d2c83f3bf5 100644 --- a/ios/MullvadVPN/View controllers/DeviceList/DeviceManagementContentView.swift +++ b/ios/MullvadVPN/View controllers/DeviceList/DeviceManagementContentView.swift @@ -42,10 +42,7 @@ class DeviceManagementContentView: UIView { textLabel.textColor = .white textLabel.translatesAutoresizingMaskIntoConstraints = false textLabel.numberOfLines = 0 - if #available(iOS 14.0, *) { - // See: https://stackoverflow.com/q/46200027/351305 - textLabel.lineBreakStrategy = [] - } + textLabel.lineBreakStrategy = [] return textLabel }() diff --git a/ios/MullvadVPN/View controllers/RedeemVoucher/RedeemVoucherContentView.swift b/ios/MullvadVPN/View controllers/RedeemVoucher/RedeemVoucherContentView.swift index 8ea061f012..b2f4d2003d 100644 --- a/ios/MullvadVPN/View controllers/RedeemVoucher/RedeemVoucherContentView.swift +++ b/ios/MullvadVPN/View controllers/RedeemVoucher/RedeemVoucherContentView.swift @@ -75,10 +75,7 @@ final class RedeemVoucherContentView: UIView { label.textColor = .red label.setContentHuggingPriority(.defaultLow, for: .horizontal) label.setContentCompressionResistancePriority(.defaultLow, for: .horizontal) - if #available(iOS 14.0, *) { - // See: https://stackoverflow.com/q/46200027/351305 - label.lineBreakStrategy = [] - } + label.lineBreakStrategy = [] return label }() diff --git a/ios/MullvadVPN/View controllers/SelectLocation/SelectLocationCell.swift b/ios/MullvadVPN/View controllers/SelectLocation/SelectLocationCell.swift index f953752038..89a44fa2f1 100644 --- a/ios/MullvadVPN/View controllers/SelectLocation/SelectLocationCell.swift +++ b/ios/MullvadVPN/View controllers/SelectLocation/SelectLocationCell.swift @@ -107,10 +107,7 @@ class SelectLocationCell: UITableViewCell { locationLabel.textColor = .white locationLabel.lineBreakMode = .byWordWrapping locationLabel.numberOfLines = 0 - if #available(iOS 14.0, *) { - // See: https://stackoverflow.com/q/46200027/351305 - locationLabel.lineBreakStrategy = [] - } + locationLabel.lineBreakStrategy = [] tickImageView.tintColor = .white diff --git a/ios/MullvadVPN/View controllers/TermsOfService/TermsOfServiceContentView.swift b/ios/MullvadVPN/View controllers/TermsOfService/TermsOfServiceContentView.swift index 3c5ad5fff8..1e5e737cfc 100644 --- a/ios/MullvadVPN/View controllers/TermsOfService/TermsOfServiceContentView.swift +++ b/ios/MullvadVPN/View controllers/TermsOfService/TermsOfServiceContentView.swift @@ -23,10 +23,7 @@ class TermsOfServiceContentView: UIView { comment: "" ) titleLabel.lineBreakMode = .byWordWrapping - if #available(iOS 14.0, *) { - // See: https://stackoverflow.com/q/46200027/351305 - titleLabel.lineBreakStrategy = [] - } + titleLabel.lineBreakStrategy = [] return titleLabel }() |
