Change the detail view back button when the timeline changes.
This commit is contained in:
parent
23c69a9223
commit
bf1f02d084
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue