Skip to content
Snippets Groups Projects
Commit cfa3bad7 authored by jojohoch's avatar jojohoch
Browse files

Refactor reset of timeout when loading media elements

parent 67715aec
No related branches found
No related tags found
No related merge requests found
Pipeline #66940 failed
......@@ -35,15 +35,20 @@ export class SpinnerComponent implements OnInit, OnDestroy {
});
}
clearTimeOut(): void {
clearTimeout(this.timeOutId);
this.timeOutId = 0;
}
sendTimeOut(): void {
if (!this.isLoaded.value) {
this.timeOut.emit(this.timeOutDuration);
}
clearTimeout(this.timeOutId);
this.clearTimeOut();
}
ngOnDestroy(): void {
if (this.timeOutId) clearTimeout(this.timeOutId);
if (this.timeOutId) this.clearTimeOut();
this.ngUnsubscribe.next();
this.ngUnsubscribe.complete();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment