store last article fetch time in account metadata

This commit is contained in:
Maurice Parker 2019-05-12 19:17:16 -05:00
parent 9c676f29f8
commit f4510e57e5
2 changed files with 5 additions and 2 deletions

View File

@ -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