Closed mycroftcanner closed 3 years ago
// // MessageHandler.swift // SwiftyInsta
Just remove all your edits, add the next parameter and it should all work fine. Please update this commit accordingly.
next
/// Get the user's inbox. public func inbox(with paginationParameters: PaginationParameters, updateHandler: PaginationUpdateHandler<Thread, AnyPaginatedResponse>?, completionHandler: @escaping PaginationCompletionHandler<Thread>) { pages.request(Thread.self, page: AnyPaginatedResponse.self, with: paginationParameters, endpoint: { Endpoint.Direct.inbox.next($0.nextMaxId) }, next: { $0.inbox.oldestCursor.string }, // Just add this line and it should all work. splice: { $0.rawResponse.inbox.threads.array?.compactMap(Thread.init) ?? [] }, update: updateHandler, completion: completionHandler) }
Just remove all your edits, add the
next
parameter and it should all work fine. Please update this commit accordingly.