eurofurence / ef-app_ios

iOS version of the official Eurofurence app
MIT License
6 stars 1 forks source link

SwiftUI - empty image files cause placeholder view to remain visible #508

Open ShezHsky opened 2 years ago

ShezHsky commented 2 years ago

When the API designates an image is available, but no body is available (e.g. due to a 404), the downloaded file is used as the cached image URL but points to an empty file. This causes AsyncImage to attempt to load the image, but nothing happens.

The model should be aware of this situation and not copy the image into the app group nor make the image URL available on the model object, so the view skips undownloaded images.