Reload nodes who's unread counts change as that could change the cell layout

This commit is contained in:
Maurice Parker 2019-10-30 20:38:57 -05:00
parent 165a286327
commit 280f754217
1 changed files with 2 additions and 4 deletions

View File

@ -99,10 +99,8 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
node = coordinator.rootNode.descendantNodeRepresentingObject(representedObject as AnyObject)
}
if let node = node, let indexPath = dataSource.indexPath(for: node), let unreadCountProvider = node.representedObject as? UnreadCountProvider {
if let cell = tableView.cellForRow(at: indexPath) as? MasterFeedTableViewCell {
cell.unreadCount = unreadCountProvider.unreadCount
}
if let node = node, dataSource.indexPath(for: node) != nil {
reloadNode(node)
}
}