Queue a reload of all visible cells anytime a favicon is downloaded. Issue #995

This commit is contained in:
Maurice Parker 2019-09-06 16:52:31 -05:00
parent 809c2fdfc5
commit 0e7d971e65

View File

@ -513,18 +513,8 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
}
@objc func faviconDidBecomeAvailable(_ note: Notification) {
guard showAvatars, let faviconURL = note.userInfo?[FaviconDownloader.UserInfoKey.faviconURL] as? String else {
return
}
let indexesToReload = tableView.indexesOfAvailableRowsPassingTest { (row) -> Bool in
guard let article = articles.articleAtRow(row) else {
return false
}
return article.feed?.faviconURL == faviconURL
}
if let indexesToReload = indexesToReload {
reloadCells(for: indexesToReload)
if showAvatars {
queueReloadAvailableCells()
}
}