Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require total parameter when constructing Paginated #47

Merged
merged 1 commit into from
Feb 17, 2022

Conversation

alexpearce
Copy link
Contributor

Currently Paginated.of computes Paginated.total by counting the number of items it receives, but Paginated.total should represent the total number of objects that are available for pagination, rather than the number currently being returned.

This PR modifies Paginated.of to require a total: int parameter, which is used to populate the Paginated.total field.

Towards NA-389.

@alexpearce alexpearce requested a review from a team as a code owner February 17, 2022 13:54
@alexpearce alexpearce force-pushed the alexpearce/paginated-total branch from 7c822b9 to a2f3d05 Compare February 17, 2022 13:58
Copy link
Contributor

@andrei-trandafir andrei-trandafir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot!

@alexpearce alexpearce merged commit c060f4d into main Feb 17, 2022
@alexpearce alexpearce deleted the alexpearce/paginated-total branch February 17, 2022 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants