url-image icon indicating copy to clipboard operation
url-image copied to clipboard

Even if the cache is used, the images will be reloaded in tabview

Open AntoniotheFuture opened this issue 3 years ago • 1 comments

Hi! I use url-image in a tabview, but even if the cache is used, when I switch between tabs, the images will still be reload.

  • OS: IOS 14

  • iPhone simulator iPhone 8、 iPhone X

  • Are you building a widget or an extension? : NO

  • Version : 3.1.1

  • Code:

let urlImageOption = URLImageOptions.init(urlRequestConfiguration: Download.URLRequestConfiguration.init(allHTTPHeaderFields: headers))
let urlImageService = URLImageService(fileStore: nil, inMemoryStore: URLImageInMemoryStore())

WindowGroup {
    ContentView()
        .environment(\.urlImageOptions, urlImageOption)
        .environment(\.urlImageService, urlImageService)
        .environmentObject(modelData)
}

TabView(selection: $modelData.selectedTab) {
            NavigationView{
                ScrollView{
                   Foreach.....
                    url-image
}}}

AntoniotheFuture avatar Oct 31 '21 11:10 AntoniotheFuture

Hey, did you ever figure this out? I can't figure out how to configure a working cache with v3.0.

jojost1 avatar May 13 '23 14:05 jojost1