mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-30 01:10:38 +00:00
Fix build error.
This commit is contained in:
1 parent
10505b872d
commit
614b091aa1
1 file changed
+10
-7
@@ -597,6 +597,16 @@ struct ReaderAPIUsageLimits {
|
||||
|
||||
// MARK: Private
|
||||
|
||||
extension ReaderAPICaller {
|
||||
|
||||
func storeConditionalGetIfNeeded(key: String, response: HTTPURLResponse) {
|
||||
guard response.forcedStatusCode == HTTPResponseCode.OK else {
|
||||
return
|
||||
}
|
||||
accountSettings?.setConditionalGetInfo(HTTPConditionalGetInfo(headers: response.allHeaderFields), for: key)
|
||||
}
|
||||
}
|
||||
|
||||
private extension ReaderAPICaller {
|
||||
|
||||
func encodeForURLPath(_ pathComponent: String?) -> String? {
|
||||
@@ -642,13 +652,6 @@ private extension ReaderAPICaller {
|
||||
|
||||
private static let defaultUsageLimitsResetAfter: TimeInterval = 60 * 60 * 24
|
||||
|
||||
func storeConditionalGetIfNeeded(key: String, response: HTTPURLResponse) {
|
||||
guard response.forcedStatusCode == HTTPResponseCode.OK else {
|
||||
return
|
||||
}
|
||||
accountSettings?.setConditionalGetInfo(HTTPConditionalGetInfo(headers: response.allHeaderFields), for: key)
|
||||
}
|
||||
|
||||
private func noteUsageLimits(from response: HTTPURLResponse) {
|
||||
guard let usageValue = response.value(forHTTPHeaderField: UsageLimitHeader.zone1Usage), let usage = Int(usageValue),
|
||||
let limitValue = response.value(forHTTPHeaderField: UsageLimitHeader.zone1Limit), let limit = Int(limitValue), limit > 0 else {
|
||||
|
||||
Reference in new issue
Block a user