With the changes there will always be one record more requested than needed.
The extra record will be removed again if available and the next will be shown in this case.
Works for me locally, but will it be an issue if something like https://github.com/matomo-org/matomo/issues/9200 happens (wasn't able to reproduce that issue locally)?
maybe that might be fixed as well, as the link should only be displayed if there is at least one more record available on the next page.
That issue is about data not being displayed for some pages, but not all. So one page shows 20 visits, the next page shows nothing, the next page shows 10 visits. W/ this PR the next button would be removed so the user can't get to the pages w/ data, if one shows nothing. Is that understanding correct? Might be an issue for that situation.
ah ok. now I understand the other issue correct. Guess you are right.