Skip to content

Commit

Permalink
remove inactive views from user's view list (#449)
Browse files Browse the repository at this point in the history
  • Loading branch information
sei-tspencer authored Dec 14, 2021
1 parent a4db780 commit 4e88676
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/services/views/views.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
import { catchError, map } from 'rxjs/operators';
import { TeamData } from '../../models/team-data';
import { ViewData } from '../../models/view-data';
import { ViewStatus } from '../../generated/player-api';

const httpOptions = {
headers: new HttpHeaders({
Expand Down Expand Up @@ -48,7 +49,7 @@ export class ViewsService {
.pipe(map((teams) => teams.filter((t) => t.isMember)))
.subscribe((teams) => {
teams.forEach((team) => {
if (team.isPrimary) {
if (team.isPrimary && view.status === ViewStatus.Active) {
const ex = <ViewData>{
id: view.id,
name: view.name,
Expand Down

0 comments on commit 4e88676

Please sign in to comment.