Move more navigation responsibilities into the AppCoordinator

This commit is contained in:
Maurice Parker
2019-07-05 17:45:39 -05:00
parent 19f8f8bc97
commit 15754684a4
6 changed files with 62 additions and 63 deletions

View File

@@ -63,16 +63,6 @@ class MasterTimelineViewController: ProgressTableViewController, UndoableCommand
resignFirstResponder()
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "showDetail" {
let controller = (segue.destination as! UINavigationController).topViewController as! DetailViewController
controller.coordinator = coordinator
controller.navigationItem.leftBarButtonItem = splitViewController?.displayModeButtonItem
controller.navigationItem.leftItemsSupplementBackButton = true
splitViewController?.toggleMasterView()
}
}
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
super.traitCollectionDidChange(previousTraitCollection)
@@ -185,7 +175,7 @@ class MasterTimelineViewController: ProgressTableViewController, UndoableCommand
}
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
coordinator.currentArticleIndexPath = indexPath
coordinator.didSelectArticle(indexPath)
}
// MARK: Notifications