mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-02-03 12:27:32 +01:00
allow cancelling of network requests
This commit is contained in:
parent
93595ab745
commit
85d54c17cc
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user