Stop using downloadComplete in PDFViewerApplication.progress

This was only necessary to prevent (unlikely) visual glitches when `disableAutoFetch = true` is being used.
However, it turns out that we can move this functionality into the `ProgressBar` class instead by checking if the entire PDF document has loaded. This works since the API is always reporting 100% loading progress regardless of how the document was loaded; see [this code](ed83d7c5e1/src/display/api.js (L2735-L2740)).
This commit is contained in:
Jonas Jenwald 2024-07-20 09:27:43 +02:00
parent ed83d7c5e1
commit 006242489d
2 changed files with 2 additions and 7 deletions

View file

@ -740,7 +740,7 @@ class ProgressBar {
}
setDisableAutoFetch(delay = /* ms = */ 5000) {
if (isNaN(this.#percent)) {
if (this.#percent === 100 || isNaN(this.#percent)) {
return;
}
if (this.#disableAutoFetchTimeout) {