From bb05d9111ebc7674ecf5328c15eb211d8cb02373 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Sun, 26 Jan 2020 21:34:50 -0700 Subject: [PATCH] Fix to use the correct count for currently selected row. Issue #1711 --- iOS/MasterFeed/MasterFeedViewController.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/iOS/MasterFeed/MasterFeedViewController.swift b/iOS/MasterFeed/MasterFeedViewController.swift index 948d3da05..629be7359 100644 --- a/iOS/MasterFeed/MasterFeedViewController.swift +++ b/iOS/MasterFeed/MasterFeedViewController.swift @@ -117,10 +117,9 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner { // 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, - let unreadCountProvider = node.representedObject as? UnreadCountProvider { + let cell = tableView.cellForRow(at: indexPath) as? MasterFeedTableViewCell { - if cell.unreadCount != unreadCountProvider.unreadCount { + if cell.unreadCount != coordinator.unreadCountFor(node) { self.reloadNode(node) }