Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the WebImage API to match SwiftUI.AsyncImage #275

Merged
merged 4 commits into from
Oct 21, 2023

Conversation

dreampiggy
Copy link
Collaborator

@dreampiggy dreampiggy commented Sep 20, 2023

make it more easy to replace SwiftUI.AsyncImage with WebImage

Note: The old API is still kept, except the .placeholder one.

This PR also close #274 and #247 #248

API

Removed:

  • WebImage.placeholder<T>(@ViewBuilder content: () -> T) -> WebImage
  • WebImage.placeholder(_ image: Image) -> WebImage
  • AnimatedImage.placeholder<T>(@ViewBuilder content: () -> T) -> AnimatedImage
  • AnimatedImage.placeholder(_ image: PlatformImage) -> AnimatedImage

Use the init method instead

@dreampiggy dreampiggy changed the title Update the WebImage API to match SwiftUI.AsyncImage wip: Update the WebImage API to match SwiftUI.AsyncImage Sep 20, 2023
@dreampiggy dreampiggy marked this pull request as draft September 20, 2023 10:11
@dreampiggy dreampiggy force-pushed the api/asyncimage branch 2 times, most recently from b02a80e to f7e1b63 Compare September 20, 2023 11:00
…e), make it more easy to replace

The old API is still kept, except the .placeholder one
@dreampiggy dreampiggy changed the title wip: Update the WebImage API to match SwiftUI.AsyncImage Update the WebImage API to match SwiftUI.AsyncImage Sep 21, 2023
@dreampiggy dreampiggy marked this pull request as ready for review September 21, 2023 10:03
1. Change the placeholder into Web URL init method (placeholder not works for data/bundle init method)
2. Add convenient .progress/.activity syntax for AnimatedImage indicator
@dreampiggy dreampiggy merged commit eb0eafa into master Oct 21, 2023
3 of 4 checks passed
@dreampiggy dreampiggy deleted the api/asyncimage branch December 19, 2023 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant