-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Able to go negative page numbering #503
Comments
I would like to add that it's a general problem. I accidentally added the same library twice because of a slow response. |
Looking at the pagination code I want to note that splitting the paginator code from the individual libraries so it can share common logic is a possible improvement |
I think what you are getting at here is that the pagination buttons should not trigger more events until the next page is loaded, and for the library I didn't really look at it, but I guess it's about waiting until the server is done as well? For this issue it's possible to just limit the page number to 0, either by not decrementing the number past 0, or bringing it up to 0 again before processing the request. The variable that holds this information seems to stay within each of the different places in the javascript that pagination is implemented. Each one is slightly different :P But maybe deactivating the event handler while the request is processing is the better fix. |
query is passed to the getItems request, so I'm wrong here |
This seems to be the most fruitful approach, usually the less almost copy-paste is there the easier it is to maintain stuff. |
to quote myself: I don't think I'll be trying to unify the pagination code in this PR, but if someone wants do that that then please merge them before this |
I'm ready for review on the PR above now :) |
@cvium I've also fixed the library double adding thing, so now it shows the loading indicator and ignores multiple presses until the action has returned a result :) |
This is probably inherited from Emby and linked to a race condition on request-> response level.
Seems like the "previous page" button is only disabled when lower boundary is 0:
The text was updated successfully, but these errors were encountered: