mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 10:36:54 -07:00
Stop making unnecessary calls to the update service
This commit is contained in:
parent
677accf5d7
commit
52a22b3a60
1 changed files with 4 additions and 1 deletions
|
@ -21,6 +21,8 @@ export class AppComponent implements OnInit {
|
|||
public updateAvailable: boolean;
|
||||
public currentUrl: string;
|
||||
|
||||
private checkedForUpdate: boolean;
|
||||
|
||||
constructor(public notificationService: NotificationService,
|
||||
public authService: AuthService,
|
||||
private readonly router: Router,
|
||||
|
@ -47,7 +49,8 @@ export class AppComponent implements OnInit {
|
|||
this.user = this.authService.claims();
|
||||
this.showNav = this.authService.loggedIn();
|
||||
|
||||
if (this.user !== null && this.user.name) {
|
||||
if (this.user !== null && this.user.name && !this.checkedForUpdate) {
|
||||
this.checkedForUpdate = true;
|
||||
this.jobService.getCachedUpdate().subscribe(x => {
|
||||
this.updateAvailable = x;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue