-
-
Notifications
You must be signed in to change notification settings - Fork 128
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
Next/Previous photo sometimes fails now we have pagination #256
Comments
@damianmoore Could you please help me to regenerate the issue by explaining about this on little-bit detail? |
@GyanP The pagination loads 100 photos at a time so you'll need to load in more than that number of photos.
|
Thanks @damianmoore
|
Hi @GyanP,
|
@damianmoore Currently we are updating the store by data of page for example:- |
As we have provided the after parameter which stores the cursorValue of last(end) photo of page. |
Merged as of 137987d. Will be included in v0.22.0. |
There is a photos Redux store which contains the photo IDs from the timeline view. This is the basis for determining the next and previous photo to go to from the detail screen. Now that not all photos are contained in the store because of pagination, it's possible the current photo ID is not in the store. This is most apparent when getting to photo detail from the map view. If we came from the map view then next/previous should still get the photo taken before or after.
The selector
ui/src/stores/photos/selector.js
should be updated so if the ID cannot be found or there is are no prev or next results it makes a GraphQL query. This query could be the same one that makes the timeline currently. The currently active search filters should still apply to this fetch. As there is anafter
parameter added for pagination, abefore
one should be added and these can both havelimit
set to1
.The text was updated successfully, but these errors were encountered: