Skip to content

Commit

Permalink
Always update the unread count in the timeline after doing a sync fet…
Browse files Browse the repository at this point in the history
…ch after representedObjects changes. Reload visible cells whenever showFeedNames changes. Fix #923.
  • Loading branch information
brentsimmons committed Sep 11, 2019
1 parent 8dda681 commit 7ad0b6b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Mac/MainWindow/Timeline/TimelineViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
if articles.count > 0 {
tableView.scrollRowToVisible(0)
}
updateUnreadCount()
}
}
}
Expand Down Expand Up @@ -106,6 +107,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
if showFeedNames != oldValue {
updateShowAvatars()
updateTableViewRowHeight()
reloadVisibleCells()
}
}
}
Expand Down Expand Up @@ -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> {
Expand Down

0 comments on commit 7ad0b6b

Please sign in to comment.