mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
allow cancelling of network requests
This commit is contained in:
@@ -28,6 +28,10 @@ final class FeedWranglerAPICaller: NSObject {
|
||||
self.transport = transport
|
||||
}
|
||||
|
||||
func cancelAll() {
|
||||
transport.cancelAll()
|
||||
}
|
||||
|
||||
func validateCredentials(completion: @escaping (Result<Credentials?, Error>) -> Void) {
|
||||
let url = FeedWranglerConfig.clientURL.appendingPathComponent("users/authorize")
|
||||
let username = self.credentials?.username ?? ""
|
||||
|
||||
@@ -57,7 +57,7 @@ final class FeedWranglerAccountDelegate: AccountDelegate {
|
||||
}
|
||||
|
||||
func accountWillBeDeleted(_ account: Account) {
|
||||
fatalError()
|
||||
// noop
|
||||
}
|
||||
|
||||
func refreshAll(for account: Account, completion: @escaping (Result<Void, Error>) -> Void) {
|
||||
@@ -122,7 +122,7 @@ final class FeedWranglerAccountDelegate: AccountDelegate {
|
||||
}
|
||||
|
||||
func cancelAll(for account: Account) {
|
||||
fatalError()
|
||||
caller.cancelAll()
|
||||
}
|
||||
|
||||
func refreshCredentials(for account: Account, completion: @escaping (() -> Void)) {
|
||||
|
||||
Reference in New Issue
Block a user