Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Iron-Ham committed Jan 8, 2024
1 parent c9c1d34 commit d9727d9
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@ public class AnyGraphQLQueryPager<Model> {
callbackQueue: DispatchQueue = .main,
completion: ((PaginationError?) -> Void)? = nil
) {
pager.loadNext(cachePolicy: cachePolicy, callbackQueue: callbackQueue, completion: { error in
callbackQueue.async { completion?(error) }
})
pager.loadNext(cachePolicy: cachePolicy, callbackQueue: callbackQueue, completion: completion)
}

/// Load the previous page, if available.
Expand All @@ -109,9 +107,7 @@ public class AnyGraphQLQueryPager<Model> {
callbackQueue: DispatchQueue = .main,
completion: ((PaginationError?) -> Void)? = nil
) {
pager.loadPrevious(cachePolicy: cachePolicy, callbackQueue: callbackQueue, completion: { error in
callbackQueue.async { completion?(error) }
})
pager.loadPrevious(cachePolicy: cachePolicy, callbackQueue: callbackQueue, completion: completion)
}

/// Loads all pages.
Expand All @@ -124,9 +120,7 @@ public class AnyGraphQLQueryPager<Model> {
callbackQueue: DispatchQueue = .main,
completion: ((PaginationError?) -> Void)? = nil
) {
pager.loadAll(fetchFromInitialPage: fetchFromInitialPage, callbackQueue: callbackQueue, completion: { error in
callbackQueue.async { completion?(error) }
})
pager.loadAll(fetchFromInitialPage: fetchFromInitialPage, callbackQueue: callbackQueue, completion: completion)
}

/// Discards pagination state and fetches the first page from scratch.
Expand Down

0 comments on commit d9727d9

Please sign in to comment.