diff --git a/libs/ui/components/src/lib/content-hero/content-hero.component.ts b/libs/ui/components/src/lib/content-hero/content-hero.component.ts index 091398fc1..8a18585b8 100644 --- a/libs/ui/components/src/lib/content-hero/content-hero.component.ts +++ b/libs/ui/components/src/lib/content-hero/content-hero.component.ts @@ -7,6 +7,7 @@ import { input, output, signal, + untracked, viewChild, ElementRef, } from '@angular/core'; @@ -53,8 +54,13 @@ export class ContentHeroComponent { const el = this.descriptionEl()?.nativeElement; if (!el) return; - this.measureOverflow(el); - this.observeOverflow(el); + // untracked: measureOverflow reads isDescriptionExpanded(); + // tracking it would re-run this effect (and rebuild the + // ResizeObserver) on every expand/collapse click. + untracked(() => { + this.measureOverflow(el); + this.observeOverflow(el); + }); }); this.destroyRef.onDestroy(() => this.resizeObserver?.disconnect()); diff --git a/libs/ui/components/src/lib/expandable-text/expandable-text.component.ts b/libs/ui/components/src/lib/expandable-text/expandable-text.component.ts index e74141241..6d372ef94 100644 --- a/libs/ui/components/src/lib/expandable-text/expandable-text.component.ts +++ b/libs/ui/components/src/lib/expandable-text/expandable-text.component.ts @@ -6,6 +6,7 @@ import { inject, input, signal, + untracked, viewChild, } from '@angular/core'; import { MatIconModule } from '@angular/material/icon'; @@ -113,8 +114,13 @@ export class ExpandableTextComponent { const el = this.textEl()?.nativeElement; if (!el) return; - this.measureOverflow(el); - this.observeOverflow(el); + // untracked: measureOverflow reads isExpanded(); tracking it + // would re-run this effect (and rebuild the ResizeObserver) on + // every toggle click. + untracked(() => { + this.measureOverflow(el); + this.observeOverflow(el); + }); }); this.destroyRef.onDestroy(() => this.resizeObserver?.disconnect()); diff --git a/libs/ui/components/src/lib/season-container/season-container.component.html b/libs/ui/components/src/lib/season-container/season-container.component.html index 9f69f555b..427f5e276 100644 --- a/libs/ui/components/src/lib/season-container/season-container.component.html +++ b/libs/ui/components/src/lib/season-container/season-container.component.html @@ -108,7 +108,7 @@ [src]="episodeInfo?.movie_image ?? ''" (error)=" $event.target.src = - './assets/images/default-episode.png' + './assets/images/default-poster.png' " alt="Episode thumbnail" loading="lazy" @@ -305,7 +305,7 @@ " (error)=" $event.target.src = - './assets/images/default-episode.png' + './assets/images/default-poster.png' " alt="Episode thumbnail" loading="lazy"