Update the showFeedNames timeline property based on what will be shown in the timeline.

This commit is contained in:
Brent Simmons 2017-12-30 10:56:58 -08:00
parent e18496d1b0
commit 0c54e61fbc
1 changed files with 13 additions and 0 deletions

View File

@ -52,6 +52,19 @@ class TimelineViewController: NSViewController, UndoableCommandRunner {
private var representedObjects: [AnyObject]? { private var representedObjects: [AnyObject]? {
didSet { didSet {
if !representedObjectArraysAreEqual(oldValue, representedObjects) { if !representedObjectArraysAreEqual(oldValue, representedObjects) {
if let representedObjects = representedObjects {
if representedObjects.count == 1 && representedObjects.first is Feed {
showFeedNames = false
}
else {
showFeedNames = true
}
}
else {
showFeedNames = false
}
postTimelineSelectionDidChangeNotification(nil) postTimelineSelectionDidChangeNotification(nil)
fetchArticles() fetchArticles()
if articles.count > 0 { if articles.count > 0 {