Handle scenario where all feeds are in folders and they all need to be removed from the account. Fixes #2741

This commit is contained in:
Maurice Parker 2021-01-18 19:07:35 -06:00
parent 6b0bdf8ca0
commit 4510ca8287
1 changed files with 6 additions and 1 deletions

View File

@ -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)
}
}
}