dmytro-anokhin / url-image

AsyncImage before iOS 15. Lightweight, pure SwiftUI Image view, that displays an image downloaded from URL, with auxiliary views and local cache.
MIT License
1.1k stars 96 forks source link

tvOS, first image in HStack temporarily goes back to progress state when row is hovered. #153

Closed JOyo246 closed 3 years ago

JOyo246 commented 3 years ago

‼️ Please fill in as much information as possible ‼️

Summary and/or background tvOS, first image in HStack temporarily goes back to progress state when row is hovered.

OS and what device you are using

Version of URLImage library 3.1.0

What you expected would happen To be able to scroll down and keep all images in their loaded state.

What actually happens When scrolling down, it reloads the first image.

Sample code

URLImage(url) { _ in
    PlaceHolderImageView()

} failure: {error, arg  in
    PlaceHolderImageView()

} content: { image in
    image
        .resizable()
        .renderingMode(.original)
        .aspectRatio(1.0, contentMode: .fit)
        .frame(minWidth: 220, idealWidth: 220, maxWidth: 220, minHeight: 220, idealHeight: 220, maxHeight: 220, alignment: .center)
        .cornerRadius(15)
}.environment(\.urlImageOptions, URLImageOptions(loadOptions: [ .loadImmediately ] ))

Test data http://srsounds.com/SR_ios_admin/index.php/endpoint/radio/getall/?id=86 (logo_url is used here)

Additional information

Misc

JOyo246 commented 3 years ago

Okay it looks like its simulator only.

dmytro-anokhin commented 3 years ago

Hey, thank you for reporting. I will still investigate to see what's going on. BTW, in 3.1 loadImmediately is default option.