Added polling back since changes doesnt always return true even if file is changed

This commit is contained in:
Timo Bejan 2022-03-21 14:28:43 +02:00
parent 1a122ceea3
commit 610dc9d3a6

View File

@ -574,13 +574,13 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
private _subscribeToFileUpdates(): void {
this.addActiveScreenSubscription = this.loadAnnotations().subscribe();
// With changes monitoring, this should not be necessary
// this.addActiveScreenSubscription = timer(0, 5000)
// .pipe(
// switchMap(() => this.stateService.file$),
// switchMap(file => this._filesService.reload(this.dossierId, file)),
// )
// .subscribe();
// TODO With changes monitoring, this should not be necessary
this.addActiveScreenSubscription = timer(0, 5000)
.pipe(
switchMap(() => this.stateService.file$),
switchMap(file => this._filesService.reload(this.dossierId, file)),
)
.subscribe();
this.addActiveScreenSubscription = this._dossiersService
.getEntityDeleted$(this.dossierId)