]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/app.component.ts
Handle sort in rss
[github/Chocobozzz/PeerTube.git] / client / src / app / app.component.ts
index 0ea3c1389404a651bc703993e360d6e2190616f8..18115ae75db4ca9c38667753687ba93fb5a35e73 100644 (file)
@@ -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