mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-11-06 02:40:58 +01:00
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:
parent
ad1e5ec205
commit
f16a7bb6d6
6 changed files with 19 additions and 167 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue