From 2ff432cfa698ffa5ff62bd584e84bd592e53c5db Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Mon, 3 Aug 2026 15:06:30 -0700 Subject: [PATCH] Undo the destination add when a Feedly feed move fails halfway, instead of leaving the feed in both folders. --- .../Sources/Account/Feedly/FeedlyAccountDelegate.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Modules/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift b/Modules/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift index b3d364bd4..46e1214b5 100644 --- a/Modules/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift +++ b/Modules/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift @@ -740,6 +740,10 @@ import Secrets do { try await caller.removeFeed(feed.feedID, fromCollectionWith: fromCollectionID) } catch { + // Undo the whole move — without removing the remote add and the local + // destination copy, the feed ends up in both folders permanently. + try? await caller.removeFeed(feed.feedID, fromCollectionWith: toCollectionID) + to.removeFeedFromTreeAtTopLevel(feed) from.addFeedToTreeAtTopLevel(feed) throw FeedlyAccountDelegateError.unableToMoveFeedBetweenFolders(feed.nameForDisplay, from.nameForDisplay, to.nameForDisplay) }