Remove obsolete code that could be causing the feed unread counts to not update. Issue #1806

This commit is contained in:
Maurice Parker 2020-03-13 17:06:53 -05:00
parent 833c336f2f
commit 66e7e425aa
1 changed files with 2 additions and 10 deletions

View File

@ -101,16 +101,8 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
node = coordinator.rootNode.descendantNodeRepresentingObject(representedObject as AnyObject)
}
// Only do the reload of the node when absolutely necessary. It can stop programatic scrolling from
// completing if called to soon after a selectRow where scrolling is necessary. See discloseFeed.
if let node = node,
let indexPath = dataSource.indexPath(for: node),
let cell = tableView.cellForRow(at: indexPath) as? MasterFeedTableViewCell {
if cell.unreadCount != coordinator.unreadCountFor(node) {
self.reloadNode(node)
}
if let node = node, dataSource.indexPath(for: node) != nil {
self.reloadNode(node)
}
}