Remove PDFViewerApplication.initPassiveLoading and directly invoke the open-method from the extension-specific code

This old method is essentially just adding, a small amount of, unnecessary indirection and we can easily invoke `PDFViewerApplication.open` directly from the extension-specific code instead.
This commit is contained in:
Jonas Jenwald 2024-03-02 09:49:05 +01:00
parent b5e00e1fae
commit ea1c910a66
4 changed files with 17 additions and 46 deletions

View file

@ -417,12 +417,11 @@ class Preferences extends BasePreferences {
}
class ExternalServices extends BaseExternalServices {
initPassiveLoading(callbacks) {
// defaultUrl is set in viewer.js
initPassiveLoading() {
ChromeCom.resolvePDFFile(
AppOptions.get("defaultUrl"),
function (url, length, originalUrl) {
callbacks.onOpenWithURL(url, length, originalUrl);
viewerApp.open({ url, length, originalUrl });
}
);
}