From 4510ca8287be32d489a234dfe4277df55a87a0e8 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Mon, 18 Jan 2021 19:07:35 -0600 Subject: [PATCH] Handle scenario where all feeds are in folders and they all need to be removed from the account. Fixes #2741 --- .../Internals/NewsBlurAccountDelegate+Internal.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Account/Sources/Account/NewsBlur/Internals/NewsBlurAccountDelegate+Internal.swift b/Account/Sources/Account/NewsBlur/Internals/NewsBlurAccountDelegate+Internal.swift index c86b30b71..f9ac2ad8b 100644 --- a/Account/Sources/Account/NewsBlur/Internals/NewsBlurAccountDelegate+Internal.swift +++ b/Account/Sources/Account/NewsBlur/Internals/NewsBlurAccountDelegate+Internal.swift @@ -178,7 +178,8 @@ extension NewsBlurAccountDelegate { } } - // Handle the account level feeds + // Handle the account level feeds. If there isn't the special folder, that means all the feeds are + // in folders and we need to remove them all from the account level. if let folderRelationships = newsBlurFolderDict[" "] { let newsBlurFolderFeedIDs = folderRelationships.map { String($0.feedID) } for feed in account.topLevelWebFeeds { @@ -186,6 +187,10 @@ extension NewsBlurAccountDelegate { account.removeWebFeed(feed) } } + } else { + for feed in account.topLevelWebFeeds { + account.removeWebFeed(feed) + } } }