]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/modal/welcome-modal.component.ts
Refactor views component
[github/Chocobozzz/PeerTube.git] / client / src / app / modal / welcome-modal.component.ts
index 05412a4cdb2060590704b4cbb8230869d24de690..c2f28960037c4c6551ef6b35188d363a49ed15bd 100644 (file)
@@ -1,7 +1,6 @@
 import { Component, ElementRef, ViewChild } from '@angular/core'
-import { Notifier } from '@app/core'
+import { Notifier, UserService } from '@app/core'
 import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
-import { UserService } from '@app/shared'
 
 @Component({
   selector: 'my-welcome-modal',
@@ -18,16 +17,15 @@ export class WelcomeModalComponent {
   ) { }
 
   show () {
-    const ref = this.modalService.open(this.modal,{
+    this.modalService.open(this.modal, {
+      centered: true,
       backdrop: 'static',
       keyboard: false,
       size: 'lg'
     })
-
-    ref.result.finally(() => this.doNotOpenAgain())
   }
 
-  private doNotOpenAgain () {
+  doNotOpenAgain () {
     this.userService.updateMyProfile({ noWelcomeModal: true })
       .subscribe(
         () => console.log('We will not open the welcome modal again.'),