8000 Fix fetching too few items per page in profile subsections by ohdj · Pull Request #33077 · ppy/osu · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix fetching too few items per page in profile subsections #33077

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

Merged
merged 1 commit into from
May 9, 2025

Conversation

ohdj
Copy link
Contributor
@ohdj ohdj commented May 9, 2025

image

image

This error was caused by directly changing to InitialItemsCount + 1. My bad for not checking before committing the changes :(

Respond #33070 (comment)

 First request: offset = 0,  limit = InitialItemsCount + 1 (e.g. 6)
Second request: offset = 5,  limit = ItemsPerPage + 1      (e.g. 51)
 Third request: offset = 55, limit = ItemsPerPage + 1      (e.g. 51)

The "+1" is applied within each individual request to check for more data, not accumulated between requests.

But to be honest, I'm not entirely clear on the logic behind this either :(

This reverts commit 10cb038.

@ohdj ohdj changed the title Hotfix Hotfix showmore button May 9, 2025
@bdach bdach changed the title Hotfix showmore button Fix fetching too few items per page in profile subsections May 9, 2025
Copy link
Collaborator
@bdach bdach left a comment

Choose a reason for hiding this comment

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

sure. between the bad original code (sure let's mutate CurrentPage to be the next page before it's actually fetched), misreading of the bad original code, pushing changes untested without actually checking whether they do what is desired, and accidental squash merge, this has been a hilarious comedy of errors. hopefully no more.

@bdach bdach merged commit 37f534a into ppy:master May 9, 2025
7 of 10 checks passed
@ohdj ohdj deleted the hotfix-showmore-button branch May 9, 2025 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0