From f8ba630cf1fb35bb572491390280e0ee3d071d6e Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Fri, 22 Jan 2021 17:04:16 -0600 Subject: [PATCH 1/2] Delete dead code --- Mac/MainWindow/Sidebar/SidebarViewController.swift | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/Mac/MainWindow/Sidebar/SidebarViewController.swift b/Mac/MainWindow/Sidebar/SidebarViewController.swift index f9ed440a6..277be185e 100644 --- a/Mac/MainWindow/Sidebar/SidebarViewController.swift +++ b/Mac/MainWindow/Sidebar/SidebarViewController.swift @@ -635,20 +635,6 @@ private extension SidebarViewController { delegate?.sidebarInvalidatedRestorationState(self) } - func updateUnreadCounts(for objects: [AnyObject]) { - // On selection, update unread counts for folders and feeds. - // For feeds, actually fetch from database. - - for object in objects { - if let feed = object as? WebFeed, let account = feed.account { - account.updateUnreadCounts(for: Set([feed])) - } - else if let folder = object as? Folder, let account = folder.account { - account.updateUnreadCounts(for: folder.flattenedWebFeeds()) - } - } - } - func nodeForItem(_ item: AnyObject?) -> Node { if item == nil { return treeController.rootNode From ff907511270b3381b702c3a6ad86b3d2b1bdd156 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Fri, 22 Jan 2021 17:10:37 -0600 Subject: [PATCH 2/2] Delete dead code --- Account/Sources/Account/Account.swift | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Account/Sources/Account/Account.swift b/Account/Sources/Account/Account.swift index 5216e931c..7acf4816b 100644 --- a/Account/Sources/Account/Account.swift +++ b/Account/Sources/Account/Account.swift @@ -1134,14 +1134,6 @@ private extension Account { return articles } - func fetchUnreadArticlesAsync(for webFeed: WebFeed, completion: @escaping (Set
) -> Void) { - // database.fetchUnreadArticlesAsync(for: Set([feed.feedID])) { [weak self] (articles) in - // self?.validateUnreadCount(feed, articles) - // callback(articles) - // } - } - - func fetchArticles(forContainer container: Container) throws -> Set
{ let feeds = container.flattenedWebFeeds() let articles = try database.fetchArticles(feeds.webFeedIDs())