Fix to use the correct count for currently selected row. Issue #1711

This commit is contained in:
Maurice Parker 2020-01-26 21:34:50 -07:00
parent f2ac6ff1df
commit bb05d9111e
1 changed files with 2 additions and 3 deletions

View File

@ -117,10 +117,9 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
// completing if called to soon after a selectRow where scrolling is necessary. See discloseFeed. // completing if called to soon after a selectRow where scrolling is necessary. See discloseFeed.
if let node = node, if let node = node,
let indexPath = dataSource.indexPath(for: node), let indexPath = dataSource.indexPath(for: node),
let cell = tableView.cellForRow(at: indexPath) as? MasterFeedTableViewCell, let cell = tableView.cellForRow(at: indexPath) as? MasterFeedTableViewCell {
let unreadCountProvider = node.representedObject as? UnreadCountProvider {
if cell.unreadCount != unreadCountProvider.unreadCount { if cell.unreadCount != coordinator.unreadCountFor(node) {
self.reloadNode(node) self.reloadNode(node)
} }