mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Optimize unread count lookup
This commit is contained in:
@@ -645,7 +645,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider {
|
||||
|
||||
func unreadCountFor(_ node: Node) -> Int {
|
||||
// The coordinator supplies the unread count for the currently selected feed
|
||||
if let feed = timelineFeed, let selectedNode = rootNode.descendantNodeRepresentingObject(feed as AnyObject), selectedNode == node {
|
||||
if node.representedObject === timelineFeed as AnyObject {
|
||||
return unreadCount
|
||||
}
|
||||
if let unreadCountProvider = node.representedObject as? UnreadCountProvider {
|
||||
|
||||
Reference in New Issue
Block a user