Always update the unread count in the timeline after doing a sync fetch after representedObjects changes. Reload visible cells whenever showFeedNames changes. Fix #923.

This commit is contained in:
Brent Simmons 2019-09-10 20:28:16 -07:00
parent 8dda681409
commit 7ad0b6b604
1 changed files with 3 additions and 4 deletions

View File

@ -48,6 +48,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
if articles.count > 0 {
tableView.scrollRowToVisible(0)
}
updateUnreadCount()
}
}
}
@ -106,6 +107,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
if showFeedNames != oldValue {
updateShowAvatars()
updateTableViewRowHeight()
reloadVisibleCells()
}
}
}
@ -1009,10 +1011,7 @@ private extension TimelineViewController {
}
func replaceArticles(with unsortedArticles: Set<Article>) {
let sortedArticles = Array(unsortedArticles).sortedByDate(sortDirection)
if articles != sortedArticles {
articles = sortedArticles
}
articles = Array(unsortedArticles).sortedByDate(sortDirection)
}
func fetchUnsortedArticlesSync(for representedObjects: [Any]) -> Set<Article> {