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

Only trigger one refresh going Back to list view. #3476

Merged
merged 1 commit into from
Jun 15, 2021
Merged

Commits on Jun 15, 2021

  1. Only trigger one refresh going Back to list view.

    If going back from a report page to a list page, a marker refresh would
    be triggered twice, once by the popstate, once by display_around. As
    only one of those had use_page set, it would at best make two identical
    requests, at worst return to page 1 of results whatever page it should
    have been showing.
    
    If we're already on a list page, trigger the refresh in popstate as
    currently; if not, skip that trigger and rely on the refresh that will
    be called in display_around.
    
    An alternative solution would have been to change the refresh in
    dispaly_around to use the same debounce as the popstate trigger, which
    would fix the issue in that it would only be called once, but introduce
    a delay waiting for the end of the debounce time.
    
    Also set use_page when going back to initial state in case that wasn't
    the first page of results.
    dracos committed Jun 15, 2021
    Configuration menu
    Copy the full SHA
    07ab4f1 View commit details
    Browse the repository at this point in the history