Skip to content

Commit

Permalink
remove "window.Notification" for "WebClient" project only, closes #328
Browse files Browse the repository at this point in the history
* so the following projects should not be affected: "proton-mail-settings", "proton-contacts", "proton-calendar"
  • Loading branch information
vladimiry committed Sep 19, 2020
1 parent c924300 commit aee67aa
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/electron-preload/webview/primary/configure-provider-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit aee67aa

Please sign in to comment.