X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fapp.component.ts;h=18115ae75db4ca9c38667753687ba93fb5a35e73;hb=7b87d2d5141d0eb48db2a3fd162208d6a79b2035;hp=0ea3c1389404a651bc703993e360d6e2190616f8;hpb=c263f3b425354cb0114d8fc22b8c4a96c3865c0b;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index 0ea3c1389..18115ae75 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts @@ -57,7 +57,7 @@ export class AppComponent implements OnInit { this.authService.loadClientCredentials() - if (this.authService.isLoggedIn()) { + if (this.isUserLoggedIn()) { // The service will automatically redirect to the login page if the token is not valid anymore this.authService.refreshUserInformation() } @@ -104,6 +104,10 @@ export class AppComponent implements OnInit { }) } + isUserLoggedIn () { + return this.authService.isLoggedIn() + } + toggleMenu () { window.scrollTo(0, 0) this.isMenuDisplayed = !this.isMenuDisplayed