From e570e82f9004c023d7ff3d37bea1d169aa216ecb Mon Sep 17 00:00:00 2001 From: gofnnp Date: Thu, 12 Jan 2023 19:27:34 +0400 Subject: [PATCH] =?UTF-8?q?dev=20#13538=20=D0=BF=D1=80=D0=B0=D0=B2=D0=BA?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/directives/download-app.directive.ts | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/angular/src/app/directives/download-app.directive.ts b/angular/src/app/directives/download-app.directive.ts index 7364900..2b3beee 100644 --- a/angular/src/app/directives/download-app.directive.ts +++ b/angular/src/app/directives/download-app.directive.ts @@ -25,23 +25,23 @@ export class DownloadAppDirective implements OnInit { console.log('#: ', e); this.deferredPrompt = e; - this.getTypeDevice(); - - if ( - !( - (this.deviceType == 'android' && this.deferredPrompt) || - this.deviceType == 'ios' - ) - ) { - console.log(this.deviceType); - console.log(this.deferredPrompt); - - this.el.nativeElement.style.display = 'none'; - } }); this.renderer.listen('window', 'appinstalled', (evt) => { console.log('INSTALLED!!!'); }); + this.getTypeDevice(); + + if ( + !( + (this.deviceType == 'android' && this.deferredPrompt) || + this.deviceType == 'ios' + ) + ) { + console.log(this.deviceType); + console.log(this.deferredPrompt); + + this.el.nativeElement.style.display = 'none'; + } }, 0) }