Fix trying to fetch images with zero fillWidth (#1753)

## Description
The bug report was caused by a race condition where the image URL was
built before the grid was fully laid out causing a `fillWidth=0` and the
`remember` would not reset after the `fillWidth` was updated to the
actual value. So this PR fixes the `remember`.

Furthermore, some extra guards are added to only pass the `fillWidth` &
`fillHeight` params if greater than 0.

Finally, the `EpisodeCard` code is deleted because it's height & width
logic was overly complicated and `BannerCardWithTitle` provides better
functionality anyway.

### Related issues
Should fix #1751
Maybe #1156 is also fixed by this

### Testing
Emulator, but I haven't been able to reproduce the race condition, but
the fix makes sense given the bug report

## Screenshots
N/A

## AI or LLM usage
None
This commit is contained in:
Damontecres 2026-07-26 16:36:49 -04:00 • committed by GitHub
parent ad1e5ec205
commit f16a7bb6d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 19 additions and 167 deletions

View file

@ -223,11 +223,11 @@ class ImageUrlService
imageType = imageType,
maxWidth = maxWidth,
maxHeight = maxHeight,
width = width,
height = height,
width = width?.takeIf { it > 0 },
height = height?.takeIf { it > 0 },
quality = quality,
fillWidth = fillWidth,
fillHeight = fillHeight,
fillWidth = fillWidth?.takeIf { it > 0 },
fillHeight = fillHeight?.takeIf { it > 0 },
tag = tag,
format = format,
percentPlayed = percentPlayed,