Skip to content
This repository has been archived by the owner on Dec 15, 2024. It is now read-only.

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

Open
AntoniotheFuture opened this issue Oct 31, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@AntoniotheFuture
Copy link

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 AntoniotheFuture added the bug Something isn't working label Oct 31, 2021
@jojost1
Copy link

jojost1 commented May 13, 2023

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants