Correctly delete last feed in a folder.

This commit is contained in:
Maurice Parker 2020-10-25 17:44:43 -05:00
parent f1ab7115b0
commit 7e32c9f551
1 changed files with 2 additions and 6 deletions

View File

@ -381,12 +381,8 @@ final class ReaderAPIAccountDelegate: AccountDelegate {
} }
func removeWebFeed(for account: Account, with feed: WebFeed, from container: Container, completion: @escaping (Result<Void, Error>) -> Void) { func removeWebFeed(for account: Account, with feed: WebFeed, from container: Container, completion: @escaping (Result<Void, Error>) -> Void) {
if feed.folderRelationship?.count ?? 0 > 1 { account.clearWebFeedMetadata(feed)
deleteTagging(for: account, with: feed, from: container, completion: completion) deleteSubscription(for: account, with: feed, from: container, completion: completion)
} else {
account.clearWebFeedMetadata(feed)
deleteSubscription(for: account, with: feed, from: container, completion: completion)
}
} }
func moveWebFeed(for account: Account, with feed: WebFeed, from: Container, to: Container, completion: @escaping (Result<Void, Error>) -> Void) { func moveWebFeed(for account: Account, with feed: WebFeed, from: Container, to: Container, completion: @escaping (Result<Void, Error>) -> Void) {