fix(ui): stale list thumbnails when navigating (#11609)

### What? Stale list view images
Thumbnail images are stale on slow connections.

### Why?
The variable `fileExists` is not reset when the `fileSrc` prop changes.

#### Before

https://github.com/user-attachments/assets/57a2352a-8312-4070-ba16-8c4f4d4e58e2

#### After

https://github.com/user-attachments/assets/ea44b460-823d-412a-bed0-425378480bb5
This commit is contained in:
Jarrod Flesch
2025-03-10 14:14:00 -04:00
committed by GitHub
parent 72efc843cc
commit fc5876a602

View File

@@ -31,6 +31,7 @@ export const Thumbnail: React.FC<ThumbnailProps> = (props) => {
setFileExists(false)
return
}
setFileExists(undefined)
const img = new Image()
img.src = fileSrc
@@ -81,6 +82,7 @@ export function ThumbnailComponent(props: ThumbnailComponentProps) {
setFileExists(false)
return
}
setFileExists(undefined)
const img = new Image()
img.src = fileSrc