Make Account and AccountDelegate interfaces more consistent by requiring the container parameter on removeFeed. Resolves #802

This commit is contained in:
Maurice Parker
2019-07-17 15:41:21 -05:00
parent 48c5b67f57
commit 4fc1998cf3
6 changed files with 18 additions and 7 deletions

View File

@@ -153,19 +153,28 @@ private struct SidebarItemSpecifier {
func delete(completion: @escaping () -> Void) {
if let feed = feed {
guard let container = path.resolveContainer() else {
completion()
return
}
BatchUpdate.shared.start()
account?.removeFeed(feed, from: path.resolveContainer()) { result in
account?.removeFeed(feed, from: container) { result in
BatchUpdate.shared.end()
completion()
self.checkResult(result)
}
} else if let folder = folder {
BatchUpdate.shared.start()
account?.removeFolder(folder) { result in
BatchUpdate.shared.end()
completion()
self.checkResult(result)
}
}
}