diff --git a/client/stillbox/src/app/talkgroups/talkgroups.service.ts b/client/stillbox/src/app/talkgroups/talkgroups.service.ts index 76be1c3..0c8d7d2 100644 --- a/client/stillbox/src/app/talkgroups/talkgroups.service.ts +++ b/client/stillbox/src/app/talkgroups/talkgroups.service.ts @@ -26,7 +26,6 @@ export interface TalkgroupsPaginated { providedIn: 'root', }) export class TalkgroupService { - private readonly _getTalkgroup = new Map>(); private tgs$: Observable; private tags$!: Observable; private fetchAll = new BehaviorSubject<'fetch'>('fetch'); @@ -50,15 +49,9 @@ export class TalkgroupService { } getTalkgroup(sys: number, tg: number): Observable { - const key = this.tgKey(sys, tg); - if (!this._getTalkgroup.get(key)) { - return this.tgs$.pipe( - switchMap((talkg) => - talkg.filter((tgv) => tgv.tgid == tg && tgv.system_id == sys), - ), - ); - } - return this._getTalkgroup.get(key)!; + return this.tgs$.pipe( + switchMap((tgs) => tgs.filter(t => t.system_id === sys && t.tgid === tg)) + ); } putTalkgroup(tu: TalkgroupUpdate): Observable {