Change the detail view back button when the timeline changes.

This commit is contained in:
Maurice Parker 2019-04-23 09:52:49 -05:00
parent 23c69a9223
commit bf1f02d084
1 changed files with 7 additions and 0 deletions

View File

@ -80,6 +80,13 @@ class DetailViewController: UIViewController {
let starImage = article.status.starred ? AppAssets.starClosedImage : AppAssets.starOpenImage
starBarButtonItem.image = starImage
if let timelineName = navState?.timelineName {
if navigationController?.navigationItem.backBarButtonItem?.title != timelineName {
let backItem = UIBarButtonItem(title: timelineName, style: .plain, target: nil, action: nil)
navigationController?.navigationItem.backBarButtonItem = backItem
}
}
}
func reloadHTML() {