From c222c446b50dfc156f42e335b82b673e0282e115 Mon Sep 17 00:00:00 2001 From: Art Lowel Date: Tue, 6 May 2025 14:58:53 +0200 Subject: [PATCH] don't show the loading animation when src is set to null --- src/app/thumbnail/thumbnail.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/thumbnail/thumbnail.component.ts b/src/app/thumbnail/thumbnail.component.ts index 43cce16d36..179af1dac0 100644 --- a/src/app/thumbnail/thumbnail.component.ts +++ b/src/app/thumbnail/thumbnail.component.ts @@ -198,11 +198,11 @@ export class ThumbnailComponent implements OnChanges { // isLoading$ will be set to false by the error or success handler afterwards, except in the // case where src is null, then we have to set it manually here (because those handlers won't // trigger) - if (this.isLoading$.getValue() === false) { + if (src !== null && this.isLoading$.getValue() === false) { this.isLoading$.next(true); } this.src$.next(src); - if (src === null) { + if (src === null && this.isLoading$.getValue() === true) { this.isLoading$.next(false); } }