From aee67aa775d9c7ee4fb863fb01f2bde8b6931eec Mon Sep 17 00:00:00 2001 From: Vladimir Y Date: Sat, 19 Sep 2020 01:22:40 +0300 Subject: [PATCH] remove "window.Notification" for "WebClient" project only, closes #328 * so the following projects should not be affected: "proton-mail-settings", "proton-contacts", "proton-calendar" --- .../webview/primary/configure-provider-app.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/electron-preload/webview/primary/configure-provider-app.ts b/src/electron-preload/webview/primary/configure-provider-app.ts index ac24d8a18..25fec3ce1 100644 --- a/src/electron-preload/webview/primary/configure-provider-app.ts +++ b/src/electron-preload/webview/primary/configure-provider-app.ts @@ -84,19 +84,21 @@ export function configureProviderApp( initSpellCheckProvider(logger); applyZoomFactor(logger); - disableBrowserNotificationFeature(logger); registerDocumentKeyDownEventListener(document, logger); registerDocumentClickEventListener(document, logger); const packagedWebClientApp = resolvePackagedWebClientApp(packagedWebClientUrl); - const isAngularWebClient = packagedWebClientApp.project === "WebClient"; - logger.verbose(JSON.stringify({packagedWebClientApp, isAngularWebClient})); + const isWebClient = packagedWebClientApp.project === "WebClient"; + logger.verbose(JSON.stringify({packagedWebClientApp, isWebClient})); - if (!isAngularWebClient) { + if (!isWebClient) { logger.info(`Skip configuring AngularWebClient-specific stuff`); return; } + // should be called for "WebClient" project only + disableBrowserNotificationFeature(logger); + logger.info(`Start configuring AngularWebClient-specific stuff`); configureAngularApp();