Use the new "reporttelemetry" event in more viewer components

By utilizing the recently added "reporttelemetry" event, we can avoid having to manually pass in `externalServices` to a number of viewer components.
This commit is contained in:
Jonas Jenwald 2023-09-20 14:08:28 +02:00
parent f2d75d9221
commit fe60db27b1
3 changed files with 16 additions and 18 deletions

View file

@ -615,8 +615,7 @@ const PDFViewerApplication = {
appConfig.toolbar,
eventBus,
l10n,
await this._nimbusDataPromise,
externalServices
await this._nimbusDataPromise
);
} else {
this.toolbar = new Toolbar(appConfig.toolbar, eventBus, l10n);
@ -626,8 +625,7 @@ const PDFViewerApplication = {
if (appConfig.secondaryToolbar) {
this.secondaryToolbar = new SecondaryToolbar(
appConfig.secondaryToolbar,
eventBus,
externalServices
eventBus
);
}
@ -2141,7 +2139,6 @@ const PDFViewerApplication = {
eventBus._off("fileinputchange", webViewerFileInputChange);
eventBus._off("openfile", webViewerOpenFile);
}
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
eventBus._off("reporttelemetry", webViewerReportTelemetry);
}