iCloud: keep a feed visible at the top level instead of hiding it when its destination folder isn't known yet, so moved feeds don't disappear. Fixes #5124.

This commit is contained in:
Brent Simmons committed 2026-08-01 21:48:40 -07:00
1 parent 6d0e8f4906
commit 49e1975fa0
1 file changed
+9
@@ -126,6 +126,8 @@ final class CloudKitAcountZoneDelegate: CloudKitZoneDelegate {
if let existingUnclaimedFeeds = existingUnclaimedFeeds[containerExternalID] {
for existingUnclaimedFeed in existingUnclaimedFeeds {
// Clear the top-level safety-net fallback (no-op if not there) so we don't leave a duplicate.
account.removeFeedFromTreeAtTopLevel(existingUnclaimedFeed)
container.addFeedToTreeAtTopLevel(existingUnclaimedFeed)
}
self.existingUnclaimedFeeds.removeValue(forKey: containerExternalID)
@@ -168,6 +170,13 @@ private extension CloudKitAcountZoneDelegate {
}
}
}
// Never leave a moved feed invisible: if its destination container(s) aren't known locally yet,
// keep it visible at the top level. addOrUpdateContainer relocates it when the folder record arrives.
// <https://github.com/Ranchero-Software/NetNewsWire/issues/5124>
if account.existingContainers(withFeed: feed).isEmpty {
account.addFeedToTreeAtTopLevel(feed)
}
}
@MainActor func createFeedIfNecessary(url: URL, name: String?, editedName: String?, homePageURL: String?, feedExternalID: String, container: Container) {