From 03e64704fe3bafce7a86c025e0c3aa791cfe8881 Mon Sep 17 00:00:00 2001 From: Andrew Schlackman <72105194+sei-aschlackman@users.noreply.github.com> Date: Fri, 5 Jan 2024 12:16:06 -0500 Subject: [PATCH] fixed additional reloading on token renewal --- .../player/application-list/application-list.component.ts | 2 -- src/app/components/player/player.component.html | 8 ++++---- src/app/components/player/player.component.ts | 6 +++--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/app/components/player/application-list/application-list.component.ts b/src/app/components/player/application-list/application-list.component.ts index dbb5b077..e6e67fcb 100644 --- a/src/app/components/player/application-list/application-list.component.ts +++ b/src/app/components/player/application-list/application-list.component.ts @@ -12,7 +12,6 @@ import { } from '@angular/core'; import { DomSanitizer } from '@angular/platform-browser'; import { ComnAuthQuery, ComnAuthService, Theme } from '@cmusei/crucible-common'; -import { User } from 'oidc-client-ts'; import { Observable, Subject } from 'rxjs'; import { map, takeUntil, tap } from 'rxjs/operators'; import { ApplicationData } from '../../../models/application-data'; @@ -28,7 +27,6 @@ import { FocusedAppService } from '../../../services/focused-app/focused-app.ser }) export class ApplicationListComponent implements OnInit, OnChanges, OnDestroy { @Input() viewId: string; - @Input() user: User; @Input() teams: TeamData[]; public applications$: Observable; diff --git a/src/app/components/player/player.component.html b/src/app/components/player/player.component.html index 3a12dbf7..6ecafbe0 100644 --- a/src/app/components/player/player.component.html +++ b/src/app/components/player/player.component.html @@ -30,7 +30,6 @@

@@ -62,11 +61,12 @@

diff --git a/src/app/components/player/player.component.ts b/src/app/components/player/player.component.ts index 3bd27947..1f071252 100644 --- a/src/app/components/player/player.component.ts +++ b/src/app/components/player/player.component.ts @@ -38,6 +38,8 @@ export class PlayerComponent implements OnInit, OnDestroy { public opened$: Observable = this.routerQuery.selectQueryParams('opened'); + public user$ = this.loggedInUserService.loggedInUser$; + public view: View; public viewId: string; public opened: boolean; @@ -92,7 +94,6 @@ export class PlayerComponent implements OnInit, OnDestroy { // switchMap in case router state changes. switchMap((state) => combineLatest([ - this.loggedInUserService.loggedInUser$, state.params['id'] ? this.viewService.getView(state.params['id']) : new Observable(), @@ -101,9 +102,8 @@ export class PlayerComponent implements OnInit, OnDestroy { : new Observable(), ]).pipe( // this pipe allows us to return all previous observable values. - map(([user, view, teams]) => ({ + map(([view, teams]) => ({ state, - user, view, teams: teams.filter((t) => t.isMember), team: teams.find((t) => t.isPrimary),