intermediate commit

This commit is contained in:
lotte
2018-08-29 15:12:01 +02:00
parent 2cbe6a6d91
commit 777facf5cd
91 changed files with 1150 additions and 964 deletions

View File

@@ -1,3 +1,4 @@
import { filter, first, take } from 'rxjs/operators';
import {
AfterViewInit,
ChangeDetectionStrategy,
@@ -9,7 +10,7 @@ import {
} from '@angular/core';
import { NavigationCancel, NavigationEnd, NavigationStart, Router } from '@angular/router';
import { Store } from '@ngrx/store';
import { select, Store } from '@ngrx/store';
import { TranslateService } from '@ngx-translate/core';
@@ -62,10 +63,10 @@ export class AppComponent implements OnInit, AfterViewInit {
this.dispatchWindowSize(this._window.nativeWindow.innerWidth, this._window.nativeWindow.innerHeight);
// Whether is not authenticathed try to retrieve a possible stored auth token
this.store.select(isAuthenticated)
.take(1)
.filter((authenticated) => !authenticated)
.subscribe((authenticated) => this.authService.checkAuthenticationToken());
this.store.pipe(select(isAuthenticated),
first(),
filter((authenticated) => !authenticated)
).subscribe((authenticated) => this.authService.checkAuthenticationToken());
}