mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Make Account and AccountDelegate interfaces more consistent by requiring the container parameter on removeFeed. Resolves #802
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user