From 2665e70f403640254091e4013d539eefb3c98585 Mon Sep 17 00:00:00 2001 From: Bastian Rihm Date: Wed, 13 Nov 2024 17:19:17 +0100 Subject: [PATCH] Fix projection flicker on data change --- .../components/projector/projector.component.html | 2 +- .../components/projector/projector.component.ts | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/client/src/app/site/pages/meetings/modules/projector/components/projector/projector.component.html b/client/src/app/site/pages/meetings/modules/projector/components/projector/projector.component.html index cb4fac75e9..e6a66668fe 100644 --- a/client/src/app/site/pages/meetings/modules/projector/components/projector/projector.component.html +++ b/client/src/app/site/pages/meetings/modules/projector/components/projector/projector.component.html @@ -44,7 +44,7 @@ @if (projector!.show_clock) { } - @for (slide of slides | async; track slide) { + @for (slide of slides | async; track slide.id) {
[]> = new Observable[]>(); + public slides: Observable<(SlideData & { id: Id })[]> = new Observable< + (SlideData & { id: Id })[] + >(); /** * Info about if the user is offline. @@ -160,13 +162,14 @@ export class ProjectorComponent extends BaseUiComponent implements OnDestroy { (projector?.current_projections || []).map( projection => ({ + id: projection.id, collection: projection.content?.collection, data: projection.content, stable: !!projection.stable, type: projection.type || ``, options: projection.options || {}, ...(!!projection.content?.[`error`] && { error: projection.content[`error`] }) - }) as SlideData + }) as SlideData & { id: Id } ) ) )