Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions WordPress/Classes/Models/ValueTransformers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import Foundation
extension ValueTransformer {
@objc
static func registerCustomTransformers() {
guard #available(iOS 12.0, *) else {
return
}

CoordinateValueTransformer.register()
NSErrorValueTransformer.register()
SetValueTransformer.register()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,10 @@ extension SearchableActivityConvertable where Self: UIViewController {

activity.isEligibleForSearch = true
activity.isEligibleForHandoff = false
activity.isEligibleForPrediction = true

if #available(iOS 12.0, *) {
activity.isEligibleForPrediction = true

if let wpActivityType = WPActivityType(rawValue: activityType) {
activity.suggestedInvocationPhrase = wpActivityType.suggestedInvocationPhrase
}
if let wpActivityType = WPActivityType(rawValue: activityType) {
activity.suggestedInvocationPhrase = wpActivityType.suggestedInvocationPhrase
}

// Set the UIViewController's userActivity property, which is defined in UIResponder. Doing this allows
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ class GutenGhostView: UIView {
@IBOutlet var toolbarViews: [UIView]!
@IBOutlet weak var toolbarTopBorderView: UIView! {
didSet {
if #available(iOS 12.0, *) {
let isDarkStyle = traitCollection.userInterfaceStyle == .dark
toolbarTopBorderView.isHidden = isDarkStyle
}
let isDarkStyle = traitCollection.userInterfaceStyle == .dark
toolbarTopBorderView.isHidden = isDarkStyle
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,7 @@ class AppSettingsViewController: UITableViewController {

tableView?.deselectSelectedRowWithAnimation(true)

if #available(iOS 12.0, *) {
NSUserActivity.deleteAllSavedUserActivities {}
}
NSUserActivity.deleteAllSavedUserActivities {}

let notice = Notice(title: NSLocalizedString("Siri Reset Confirmation", value: "Successfully cleared Siri Shortcut Suggestions", comment: "Notice displayed to the user after clearing the Siri activity donations."), feedbackType: .success)
ActionDispatcher.dispatch(NoticeAction.post(notice))
Expand Down Expand Up @@ -460,14 +458,12 @@ private extension AppSettingsViewController {
spotlightClearCacheRow
]

if #available(iOS 12.0, *) {
let siriClearCacheRow = BrandedNavigationRow(
title: NSLocalizedString("Siri Reset Prompt", value: "Clear Siri Shortcut Suggestions", comment: "Label for button that clears user activities donated to Siri."),
action: clearSiriActivityDonations(),
accessibilityIdentifier: "spotlightClearCacheButton")
let siriClearCacheRow = BrandedNavigationRow(
title: NSLocalizedString("Siri Reset Prompt", value: "Clear Siri Shortcut Suggestions", comment: "Label for button that clears user activities donated to Siri."),
action: clearSiriActivityDonations(),
accessibilityIdentifier: "spotlightClearCacheButton")

tableRows.append(siriClearCacheRow)
}
tableRows.append(siriClearCacheRow)

tableRows.append(mediaRemoveLocation)
let removeLocationFooterText = NSLocalizedString("Removes location metadata from photos before uploading them to your site.", comment: "Explanatory text for removing the location from uploaded media.")
Expand Down
4 changes: 0 additions & 4 deletions WordPress/Classes/ViewRelated/NUX/SignupEpilogueCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,6 @@ private extension SignupEpilogueCell {
}

func configureTextContentTypeIfNeeded(for cellType: EpilogueCellType) {
guard #available(iOS 12, *) else {
return
}

switch cellType {
case .displayName:
cellField.textContentType = .name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ class FloatingActionButton: UIButton {
layer.shadowColor = Constants.shadowColor.cgColor
layer.shadowOffset = .zero
layer.shadowRadius = Constants.shadowRadius
if #available(iOS 12.0, *) {
layer.shadowOpacity = traitCollection.userInterfaceStyle == .light ? 1 : 0
} else {
layer.shadowOpacity = 1
}
layer.shadowOpacity = traitCollection.userInterfaceStyle == .light ? 1 : 0
}

override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ class WPSplitViewController: UISplitViewController {
// This is to work around an apparent bug in iOS 13 where the detail view is assuming the system is in dark
// mode when switching out of the app and then back in. Here we ensure the overridden user interface style
// traits are replaced with the correct current traits before we use them.
if #available(iOS 12.0, *) {
traits.append(UITraitCollection(userInterfaceStyle: traitCollection.userInterfaceStyle))
}
traits.append(UITraitCollection(userInterfaceStyle: traitCollection.userInterfaceStyle))

return UITraitCollection(traitsFrom: traits)
}
Expand Down