Prevent row selection on iPhone as keeping selected rows highlighted is an iPad only feature

This commit is contained in:
Maurice Parker 2019-09-06 11:11:28 -05:00
parent cdbaeda97b
commit aa7c60ee3a
2 changed files with 7 additions and 2 deletions

View File

@ -432,6 +432,9 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
// MARK: API
func updateFeedSelection() {
guard traitCollection.userInterfaceIdiom == .pad else {
return
}
if let indexPath = coordinator.currentFeedIndexPath {
if tableView.indexPathForSelectedRow != indexPath {
tableView.selectRow(at: indexPath, animated: true, scrollPosition: .middle)

View File

@ -156,7 +156,9 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
}
func updateArticleSelection(animate: Bool) {
guard !coordinator.articles.isEmpty else { return }
guard traitCollection.userInterfaceIdiom == .pad && !coordinator.articles.isEmpty else {
return
}
if let indexPath = coordinator.currentArticleIndexPath {
if tableView.indexPathForSelectedRow != indexPath {