store last article fetch time in account metadata
This commit is contained in:
parent
9c676f29f8
commit
f4510e57e5
|
@ -312,11 +312,14 @@ final class FeedbinAPICaller: NSObject {
|
|||
callURL.queryItems = [URLQueryItem(name: "since", value: sinceString)]
|
||||
let request = URLRequest(url: callURL.url!, credentials: credentials)
|
||||
|
||||
transport.send(request: request, resultType: [FeedbinEntry].self) { result in
|
||||
transport.send(request: request, resultType: [FeedbinEntry].self) { [weak self] result in
|
||||
|
||||
switch result {
|
||||
case .success(let (response, entries)):
|
||||
|
||||
let dateInfo = HTTPDateInfo(urlResponse: response)
|
||||
self?.accountMetadata?.lastArticleFetch = dateInfo?.date
|
||||
|
||||
let pagingInfo = HTTPLinkPagingInfo(urlResponse: response)
|
||||
completion(.success((entries, pagingInfo.nextPage)))
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 6b0839c66cf772fb08aabd1b1d9c882897ad1adb
|
||||
Subproject commit 517583fecf997254642ff7dfd629b5445b661e10
|
Loading…
Reference in New Issue