if #available

Removes < iOS 15 if #available checks
This commit is contained in:
Stuart Breckenridge
2022-01-22 20:42:24 +08:00
parent d680fe0988
commit 7a670516fb
7 changed files with 55 additions and 138 deletions

View File

@@ -101,12 +101,10 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
}
// Disable swipe back on iPad Mice
if #available(iOS 13.4, *) {
guard let gesture = self.navigationController?.interactivePopGestureRecognizer as? UIPanGestureRecognizer else {
return
}
gesture.allowedScrollTypesMask = []
guard let gesture = self.navigationController?.interactivePopGestureRecognizer as? UIPanGestureRecognizer else {
return
}
gesture.allowedScrollTypesMask = []
}
@@ -525,12 +523,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
}
@objc private func reloadAllVisibleCells() {
if #available(iOS 15, *) {
reconfigureCells(coordinator.articles)
} else {
let visibleArticles = tableView.indexPathsForVisibleRows!.compactMap { return dataSource.itemIdentifier(for: $0) }
reloadCells(visibleArticles)
}
reconfigureCells(coordinator.articles)
}
private func reloadCells(_ articles: [Article]) {