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

Make calculateMatch public #16428

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions web/pdf_find_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ class PDFFindController {
return [isUnicode, query];
}

#calculateMatch(pageIndex) {
calculateMatch(pageIndex) {
let query = this.#query;
if (!query) {
// Do nothing: the matches should be wiped out already.
Expand Down Expand Up @@ -905,7 +905,7 @@ class PDFFindController {
this._pendingFindMatches.add(i);
this._extractTextPromises[i].then(() => {
this._pendingFindMatches.delete(i);
this.#calculateMatch(i);
this.calculateMatch(i);
});
}
}
Expand Down Expand Up @@ -1075,7 +1075,7 @@ class PDFFindController {
current += matchIdx + 1;
}
// When searching starts, this method may be called before the `pageMatches`
// have been counted (in `_calculateMatch`). Ensure that the UI won't show
// have been counted (in `calculateMatch`). Ensure that the UI won't show
// temporarily broken state when the active find result doesn't make sense.
if (current < 1 || current > total) {
current = total = 0;
Expand Down