Refresh feeds and sidebar when downloaded articles update all their unread counts. Issue #1430

This commit is contained in:
Maurice Parker
2019-12-10 18:17:54 -07:00
parent 6f2e6a7d9a
commit e303d64c1d
3 changed files with 16 additions and 2 deletions

View File

@@ -65,6 +65,7 @@ protocol SidebarDelegate: class {
NotificationCenter.default.addObserver(self, selector: #selector(webFeedSettingDidChange(_:)), name: .WebFeedSettingDidChange, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(displayNameDidChange(_:)), name: .DisplayNameDidChange, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(userDidRequestSidebarSelection(_:)), name: .UserDidRequestSidebarSelection, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(downloadArticlesDidUpdateUnreadCounts(_:)), name: .DownloadArticlesDidUpdateUnreadCounts, object: nil)
outlineView.reloadData()
@@ -149,6 +150,10 @@ protocol SidebarDelegate: class {
revealAndSelectRepresentedObject(feed as AnyObject)
}
@objc func downloadArticlesDidUpdateUnreadCounts(_ note: Notification) {
rebuildTreeAndRestoreSelection()
}
// MARK: - Actions
@IBAction func delete(_ sender: AnyObject?) {