From 086bb90064f4baea8521ba0c9e1e4c490fb390d1 Mon Sep 17 00:00:00 2001 From: Daniel Ponte Date: Mon, 30 Dec 2024 16:58:02 -0500 Subject: [PATCH] wip --- .../src/app/talkgroups/talkgroups.service.ts | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) 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 {