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

Check that the correct pdfDocument is still active, before rendering the outline/attachments/layers #13212

Merged

Commits on Apr 10, 2021

  1. Check that the correct pdfDocument is still active, before renderin…

    …g the outline/attachments/layers
    
    *This patch fixes some technical debt in the viewer.*
    
    Given that most API methods are (purposely) asynchronous, there's always a risk that the viewer could have been `close`d before the requested data arrives.
    Lately we've started to check this case before using the data, to prevent errors and/or inconsistent state, however the outline/attachments/layers fetching and rendering is old enough that it pre-dates those checks.
    Snuffleupagus committed Apr 10, 2021
    Configuration menu
    Copy the full SHA
    05b0798 View commit details
    Browse the repository at this point in the history
  2. Improve the handling of the currentOutlineButton enabling/disabling…

    … (PR 12777 follow-up)
    
    It's obviously better and more correct to handle the "pagesloaded" case within `PDFOutlineViewer` *itself*, rather than essentially splitting the logic in two parts and forcing `PDFSidebar` to deal with what should've been handled internally in `PDFOutlineViewer`.
    
    This is what I *should* have done in PR	12777, but for some reason didn't figure out how to implement it well enough back then; sorry about the churn here!
    Snuffleupagus committed Apr 10, 2021
    Configuration menu
    Copy the full SHA
    27062f7 View commit details
    Browse the repository at this point in the history