From d8e6355b1e8c56b05c59868d47197d3c35fea980 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Thu, 16 May 2019 10:33:58 -0500 Subject: [PATCH] Fix bug where restoring a feed in a folder could leave the feed in the account container --- .../Account/Feedbin/FeedbinAccountDelegate.swift | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift b/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift index 0a6957d2c..2063b3da9 100644 --- a/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift +++ b/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift @@ -885,12 +885,18 @@ private extension FeedbinAccountDelegate { if editedName != nil { DispatchQueue.main.async { - folder.addFeed(feed) + BatchUpdate.shared.perform { + account.removeFeed(feed) + folder.addFeed(feed) + } } self?.processRestoredFeedName(for: account, feed: feed, editedName: editedName!, completion: completion) } else { DispatchQueue.main.async { - folder.addFeed(feed) + BatchUpdate.shared.perform { + account.removeFeed(feed) + folder.addFeed(feed) + } completion(.success(())) } }