mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-02-03 04:17:44 +01:00
Change to directly modify the avatar image instead of calling reload on the cells
This commit is contained in:
parent
8de9b355c7
commit
d7c90106d1
@ -78,6 +78,10 @@ class MasterTimelineTableViewCell: UITableViewCell {
|
||||
|
||||
}
|
||||
|
||||
func setAvatarImage(_ image: UIImage) {
|
||||
avatarImageView.image = image
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
@ -285,9 +285,8 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
|
||||
guard let article = coordinator.articles.articleAtRow(indexPath.row) else {
|
||||
return
|
||||
}
|
||||
if feed == article.feed {
|
||||
tableView.reloadRows(at: [indexPath], with: .none)
|
||||
return
|
||||
if article.feed == feed, let cell = tableView.cellForRow(at: indexPath) as? MasterTimelineTableViewCell, let image = avatarFor(article) {
|
||||
cell.setAvatarImage(image)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -304,8 +303,8 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
|
||||
return
|
||||
}
|
||||
for author in authors {
|
||||
if author.avatarURL == avatarURL {
|
||||
tableView.reloadRows(at: [indexPath], with: .none)
|
||||
if author.avatarURL == avatarURL, let cell = tableView.cellForRow(at: indexPath) as? MasterTimelineTableViewCell, let image = avatarFor(article) {
|
||||
cell.setAvatarImage(image)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -323,8 +322,8 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
|
||||
guard let article = coordinator.articles.articleAtRow(indexPath.row), let articleFaviconURL = article.feed?.faviconURL else {
|
||||
return
|
||||
}
|
||||
if faviconURL == articleFaviconURL {
|
||||
tableView.reloadRows(at: [indexPath], with: .none)
|
||||
if faviconURL == articleFaviconURL, let cell = tableView.cellForRow(at: indexPath) as? MasterTimelineTableViewCell, let image = avatarFor(article) {
|
||||
cell.setAvatarImage(image)
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user