Skip to content

Commit 46b53ec

Browse files
committed
Remove iOS 13 only SchedulingCalendarViewController
1 parent f72dc2b commit 46b53ec

File tree

6 files changed

+7
-372
lines changed

6 files changed

+7
-372
lines changed

WordPress/Classes/ViewRelated/Post/Scheduling/SchedulingCalendarViewController.swift

Lines changed: 0 additions & 253 deletions
This file was deleted.

WordPress/Classes/ViewRelated/Post/Scheduling/SchedulingDatePickerViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class SchedulingDatePickerViewController: UIViewController, DatePickerSheet, Dat
6161
return item
6262
}()
6363

64-
private lazy var publishButton = UIBarButtonItem(title: NSLocalizedString("Publish immediately", comment: "Immediately publish button title"), style: .plain, target: self, action: #selector(SchedulingCalendarViewController.publishImmediately))
64+
private lazy var publishButton = UIBarButtonItem(title: NSLocalizedString("Publish immediately", comment: "Immediately publish button title"), style: .plain, target: self, action: #selector(SchedulingDatePickerViewController.publishImmediately))
6565

6666
override func viewDidLoad() {
6767
super.viewDidLoad()

WordPress/Classes/ViewRelated/Post/Scheduling/SchedulingViewControllerPresenter.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,7 @@ class PresentableSchedulingViewControllerProvider: PresentableSchedulingViewCont
4949
}
5050

5151
static func schedulingViewController(with viewModel: PublishSettingsViewModel, updated: @escaping (Date?) -> Void) -> SchedulingViewControllerProtocol {
52-
let schedulingViewController: SchedulingViewControllerProtocol
53-
if #available(iOS 14.0, *) {
54-
schedulingViewController = SchedulingDatePickerViewController()
55-
} else {
56-
schedulingViewController = SchedulingCalendarViewController()
57-
}
52+
let schedulingViewController = SchedulingDatePickerViewController()
5853
schedulingViewController.coordinator = DateCoordinator(date: viewModel.date,
5954
timeZone: viewModel.timeZone,
6055
dateFormatter: viewModel.dateFormatter,
@@ -64,6 +59,11 @@ class PresentableSchedulingViewControllerProvider: PresentableSchedulingViewCont
6459
}
6560
}
6661

62+
// FIXME: This protocol is redundant as of dropping iOS 13.
63+
//
64+
// It was used as a facade in between `SchedulingCalendarViewController` (iOS 13) and
65+
// `SchedulingDatePickerViewController` (iOS 14+). `SchedulingCalendarViewController` has been
66+
// deleted so we can remove this as well.
6767
protocol SchedulingViewControllerProtocol: UIViewController, UIViewControllerTransitioningDelegate, UIAdaptivePresentationControllerDelegate {
6868
var coordinator: DateCoordinator? { get set }
6969
}

0 commit comments

Comments
 (0)