Prevent row selection on iPhone as keeping selected rows highlighted is an iPad only feature
This commit is contained in:
parent
cdbaeda97b
commit
aa7c60ee3a
|
@ -432,6 +432,9 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
|
||||||
// MARK: API
|
// MARK: API
|
||||||
|
|
||||||
func updateFeedSelection() {
|
func updateFeedSelection() {
|
||||||
|
guard traitCollection.userInterfaceIdiom == .pad else {
|
||||||
|
return
|
||||||
|
}
|
||||||
if let indexPath = coordinator.currentFeedIndexPath {
|
if let indexPath = coordinator.currentFeedIndexPath {
|
||||||
if tableView.indexPathForSelectedRow != indexPath {
|
if tableView.indexPathForSelectedRow != indexPath {
|
||||||
tableView.selectRow(at: indexPath, animated: true, scrollPosition: .middle)
|
tableView.selectRow(at: indexPath, animated: true, scrollPosition: .middle)
|
||||||
|
|
|
@ -156,8 +156,10 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateArticleSelection(animate: Bool) {
|
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 let indexPath = coordinator.currentArticleIndexPath {
|
||||||
if tableView.indexPathForSelectedRow != indexPath {
|
if tableView.indexPathForSelectedRow != indexPath {
|
||||||
tableView.selectRow(at: indexPath, animated: animate, scrollPosition: .middle)
|
tableView.selectRow(at: indexPath, animated: animate, scrollPosition: .middle)
|
||||||
|
|
Loading…
Reference in New Issue