Skip to content

Images are not updating properly in some cases #105

Closed
@alladinian

Description

@alladinian

So, I'm not sure if I'm abusing the API or it is actually a bug, but here is the problematic setup:

  1. A view that takes some id
  2. The initializer of the view instantiates an observable object to act as the "item details" fetcher
  3. The body of the view is recalculated when the fetcher is done

now, the WebImage takes a url, which of course is invalid (empty) while the fetcher is working...

Something like:
WebImage(url: URL(string: observable.imageURL ?? ""))

which results in an empty image, even after the second pass of the body passes a valid image URL (verified in the debugger).

If instead of an empty URL I pass a static image URL, then everything works as expected:

WebImage(url: URL(string: observable.imageURL ?? "https://some_image_url"))

any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions