From a5680d1ca0e7dd3f81cec8bb6cb4e67b0b058d44 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Sun, 21 Dec 2025 13:30:08 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=EF=B8=8F=20Fixes=20unread=20counts?= =?UTF-8?q?=20not=20displaying=20correctly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In previous versions of NetNewsWire, there was a redunant `if let` cast that pushed the code to follow the `else` statement only. This commit ensure that the `else` statement code is now executed. --- iOS/MainFeed/MainFeedCollectionViewController.swift | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/iOS/MainFeed/MainFeedCollectionViewController.swift b/iOS/MainFeed/MainFeedCollectionViewController.swift index 9ed3aea8e..801f38c9e 100644 --- a/iOS/MainFeed/MainFeedCollectionViewController.swift +++ b/iOS/MainFeed/MainFeedCollectionViewController.swift @@ -636,12 +636,7 @@ final class MainFeedCollectionViewController: UICollectionViewController, Undoab return } - var node: Node? = nil - if let feed = coordinator.timelineFeed { - node = coordinator.rootNode.descendantNodeRepresentingObject(feed as AnyObject) - } else { - node = coordinator.rootNode.descendantNodeRepresentingObject(unreadCountProvider as AnyObject) - } + let node: Node? = coordinator.rootNode.descendantNodeRepresentingObject(unreadCountProvider as AnyObject) guard let unreadCountNode = node, let indexPath = coordinator.indexPathFor(unreadCountNode) else { return }