From cde0835dcc037264bc5b43b6bd75dff9d66f6744 Mon Sep 17 00:00:00 2001 From: paf <paf@titelfrei.de> Date: Mon, 17 May 2021 08:27:33 +0200 Subject: [PATCH] fix bug from shift of iqb-components version --- src/app/app-root/login/login.component.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/app/app-root/login/login.component.ts b/src/app/app-root/login/login.component.ts index 870bcb1d..568e7886 100644 --- a/src/app/app-root/login/login.component.ts +++ b/src/app/app-root/login/login.component.ts @@ -19,6 +19,7 @@ import { BackendService } from '../../backend.service'; export class LoginComponent implements OnInit, OnDestroy { static oldLoginName = ''; private routingSubscription: Subscription = null; + private systemAnnouncementSubscription: Subscription = null; returnTo = ''; problemText = ''; showPassword = false; @@ -40,12 +41,10 @@ export class LoginComponent implements OnInit, OnDestroy { ngOnInit(): void { this.mds.setSpinnerOff(); - this.routingSubscription = this.route.params.subscribe(params => { - this.returnTo = params.returnTo; - }); - setTimeout(() => { // the timeout is avery temporary fix.- after upgrading to iqb-components 3, it can be removed - this.systemAnnouncement = this.cts.getCustomText('system_announcement', '-'); - }, 500); + this.routingSubscription = this.route.params + .subscribe(params => { this.returnTo = params.returnTo; }); + this.systemAnnouncementSubscription = <Subscription> this.cts.getCustomText$('system_announcement') + .subscribe(text => { this.systemAnnouncement = text || '-'; }); } login(): void { -- GitLab