Fixed duplicate adds for local account folder feed adds. Issue #701
This commit is contained in:
parent
c61949bc04
commit
32712533d1
|
@ -388,8 +388,6 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container,
|
|||
feed.name = name
|
||||
feed.homePageURL = homePageURL
|
||||
|
||||
addFeed(feed)
|
||||
|
||||
return feed
|
||||
|
||||
}
|
||||
|
|
|
@ -377,7 +377,6 @@ final class FeedbinAccountDelegate: AccountDelegate {
|
|||
case .success(let taggingID):
|
||||
DispatchQueue.main.async {
|
||||
self.saveFolderRelationship(for: feed, withFolderName: folder.name ?? "", id: String(taggingID))
|
||||
account.removeFeed(feed)
|
||||
folder.addFeed(feed)
|
||||
completion(.success(()))
|
||||
}
|
||||
|
|
|
@ -138,11 +138,10 @@ final class LocalAccountDelegate: AccountDelegate {
|
|||
}
|
||||
|
||||
func addFeed(for account: Account, to container: Container, with feed: Feed, completion: @escaping (Result<Void, Error>) -> Void) {
|
||||
if let account = container as? Account {
|
||||
account.addFeed(feed)
|
||||
}
|
||||
if let folder = container as? Folder {
|
||||
folder.addFeed(feed)
|
||||
} else if let account = container as? Account {
|
||||
account.addFeed(feed)
|
||||
}
|
||||
completion(.success(()))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue