don't show the loading animation when src is set to null

This commit is contained in:
Art Lowel
2025-05-06 14:58:53 +02:00
parent a7bcddf597
commit c222c446b5

View File

@@ -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);
}
}