diff --git a/angular/src/app/directives/download-app.directive.ts b/angular/src/app/directives/download-app.directive.ts index d569494..fd31670 100644 --- a/angular/src/app/directives/download-app.directive.ts +++ b/angular/src/app/directives/download-app.directive.ts @@ -37,6 +37,9 @@ export class DownloadAppDirective implements OnInit { if (this.deviceType === 'ios') { this.el.nativeElement.style.display = 'block'; } + if (window.matchMedia('(display-mode: standalone)').matches) { + this.el.nativeElement.style.display = 'none'; + } } @HostListener('window:beforeinstallprompt', ['$event']) @@ -53,7 +56,7 @@ export class DownloadAppDirective implements OnInit { // Prevent Chrome 67 and earlier from automatically showing the prompt e.preventDefault(); // Stash the event so it can be triggered later. - this.deferredPrompt = e; + this.deferredPrompt = e; this.el.nativeElement.style.display = 'none'; }