From f88c58a130b08c10baf6646a2f3a136b403d4a86 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sun, 16 Sep 2018 13:11:54 -0700 Subject: [PATCH] Remove instance of no-longer-needed feed uniquing. --- Commands/DeleteFromSidebarCommand.swift | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/Commands/DeleteFromSidebarCommand.swift b/Commands/DeleteFromSidebarCommand.swift index ea6eb1f82..bfc00ad3a 100644 --- a/Commands/DeleteFromSidebarCommand.swift +++ b/Commands/DeleteFromSidebarCommand.swift @@ -161,9 +161,7 @@ private struct SidebarItemSpecifier { guard let account = account, let feed = feed else { return } - - let feedToUse = uniquedFeed(feed) - account.addFeed(feedToUse, to: resolvedFolder()) + account.addFeed(feed, to: resolvedFolder()) } private func restoreFolder() { @@ -174,16 +172,6 @@ private struct SidebarItemSpecifier { account.addFolder(folder, to: nil) } - private func uniquedFeed(_ feed: Feed) -> Feed { - - // A Feed may appear in multiple places in a given account, - // but it’s best if they’re the same Feed instance. - // Usually this will return the same Feed that was passed-in, - // but not necessarily always. - - return account?.existingFeed(with: feed.feedID) ?? feed - } - private func resolvedFolder() -> Folder? { return path.resolveContainer() as? Folder