optimize remote #3

This commit is contained in:
2026-03-09 18:41:43 +01:00
parent a46eeeee04
commit f7be5c082a
4 changed files with 41 additions and 28 deletions

View File

@@ -83,14 +83,13 @@ export class RemoteComponent implements OnDestroy {
globalSettingsService: GlobalSettingsService,
private cRef: ChangeDetectorRef
) {
const currentShowId$ = globalSettingsService.get$
.pipe(
filter((settings): settings is NonNullable<typeof settings> => !!settings),
map(_ => _.currentShow),
filter((showId): showId is string => !!showId),
distinctUntilChanged(),
takeUntil(this.destroy$)
);
const currentShowId$ = globalSettingsService.get$.pipe(
filter((settings): settings is NonNullable<typeof settings> => !!settings),
map(_ => _.currentShow),
filter((showId): showId is string => !!showId),
distinctUntilChanged(),
takeUntil(this.destroy$)
);
const show$ = currentShowId$.pipe(
switchMap(showId => this.showService.read$(showId)),