[iOS VMD Flow] Change how we handle image error #187
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The current way to know if an VMDImage "remote" image has failed to load wasn't working. The
.placeholder
modifier is not triggered again when the @State of the VMDImage changed. To fix that, I have use an environment variable to expose that stat outside of the VMDImage. That environment variable is then accessible in the placeholder view.Unfortunately, I have to make a breaking change to remove the .placeholder modifier with the param that is not working and I also had to remove the "empty" value of the LoadingStatus enum because this state wasn't really possible.
How Has This Been Tested?
On my project and in Sample app
Types of changes