From 1c58e02a813da4bde61308d5c89f3de5ffcf89a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lukas=20Mau=C3=9F?= <lukas.mauss@mni.thm.de>
Date: Sun, 24 Feb 2019 21:12:17 +0100
Subject: [PATCH] Open create-room dialog directly after successful login

---
 .../components/home/new-landing/new-landing.component.ts    | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/app/components/home/new-landing/new-landing.component.ts b/src/app/components/home/new-landing/new-landing.component.ts
index a06b6f0da..f8ed2f5bd 100644
--- a/src/app/components/home/new-landing/new-landing.component.ts
+++ b/src/app/components/home/new-landing/new-landing.component.ts
@@ -51,5 +51,11 @@ export class NewLandingComponent implements OnInit {
     });
     dialogRef.componentInstance.role = UserRole.CREATOR;
     dialogRef.componentInstance.loginType = 'beforecreation';
+    dialogRef.afterClosed()
+      .subscribe(result => {
+          if (this.user && !this.user.isGuest) {
+            this.openCreateRoomDialog();
+          }
+      });
   }
 }
-- 
GitLab