mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Stop re-loading the Preferences in PDFViewerApplication.open
, and remove the BasePreferences.reload
method
Given that the various Preferences are currently, and have been for quite some time, only used when initializing `PDFViewerApplication` re-loading them when a new PDF file is opened in the viewer is essentially a no-op. Furthermore, with the only usage of `BasePreferences.reload` now gone, the value of that method seems questionable at best. In the event that the functionality is actually needed again, similar to the `ViewHistory`, it'd probably make more sense to simply replace `PDFViewerApplication.preferences` with a new `BasePreferences` instance instead (using e.g. `DefaultExternalServices.createPreferences`).
This commit is contained in:
parent
d6f378fbaf
commit
780cbadcd7
2 changed files with 0 additions and 17 deletions
|
@ -635,8 +635,6 @@ let PDFViewerApplication = {
|
|||
if (this.pdfLoadingTask) {
|
||||
// We need to destroy already opened document.
|
||||
return this.close().then(() => {
|
||||
// Reload the preferences if a document was previously opened.
|
||||
this.preferences.reload();
|
||||
// ... and repeat the open() call.
|
||||
return this.open(file, args);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue