-
Notifications
You must be signed in to change notification settings - Fork 6
feat: 🎸 gif supported by SDWebImage #32
feat: 🎸 gif supported by SDWebImage #32
Conversation
6779dac
to
d3d8c45
Compare
f851191
to
e0ceae7
Compare
e0ceae7
to
84ce935
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks really good!
I noticed that cache has a certain impact on memory. Lets add a section to the README to inform the app developer that app developer decides if/when image cache gets deleted. For example, for onDisappear
for AssistantView
the following is possible
SDImageCache.shared.clearMemory()
SDImageCache.shared.clearDisk()
Also the README file has to be updated in the following areas
.frame(width: 32, height: 32, alignment: .center) | ||
.clipped() | ||
} else { | ||
Image(systemName: "icloud.slash") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this new?
} | ||
} | ||
|
||
struct ImageViewWrapper<Content>: View where Content: View { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a Preview for ImageViewWrapper
|
||
func updateUIView(_ uiView: UIImageViewWrapper, context: UIViewRepresentableContext<ImageViewRepresentable>) { | ||
uiView.imageView.contentMode = self.imageManager.contentMode | ||
/// retry strategy missed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this comment mean?
2275708
to
c989908
Compare
c989908
to
9becf1a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank yo so much @ShadowTourist , that looks really great!!
@justinguo I assume that is also fine from your side?
Here is my last-minute nit-picking feedback. Once incorporated I will merge the PR into a new branch devBreaking
.
Just in case you or Justin wonder why a new branch: there are already changes in dev branch which were not yet published. I might want to roll those out as a patch release but the gif support through SDWebImage is a minor/major release worth due to the breaking changes of switching package dependencies.
@@ -1,4 +1,5 @@ | |||
import Combine | |||
import SDWebImage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is needed here. If so please remove
README.md
Outdated
@@ -87,7 +87,7 @@ curl -X POST "<BaseUrl>/connect/v1/channels" \ | |||
|
|||
- [SAPCommon](https://help.sap.com/doc/978e4f6c968c4cc5a30f9d324aa4b1d7/Latest/en-US/Documents/Frameworks/SAPCommon/index.html) for Logging | |||
- [SAPFoundation](https://help.sap.com/doc/978e4f6c968c4cc5a30f9d324aa4b1d7/Latest/en-US/Documents/Frameworks/SAPFoundation/index.html) for Network Connectivity and Authentication | |||
- [URLImage](https://github.com/dmytro-anokhin/url-image) for asynchronous image loading in SwiftUI | |||
- [SDWebImage](https://github.com/SDWebImage/SDWebImage) for asynchronous image loading in SwiftUI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [SDWebImage](https://github.com/SDWebImage/SDWebImage) for asynchronous image loading in SwiftUI | |
- [SDWebImage](https://github.com/SDWebImage/SDWebImage) for asynchronous image loading and gif animation in SwiftUI |
README.md
Outdated
@@ -146,6 +146,9 @@ AssistantView() | |||
.onDisappear { | |||
viewModel.cancelSubscriptions() | |||
dataPublisher.resetConversation() | |||
//Clear SDImage Cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//Clear SDImage Cache | |
// SAPCAI uses `SDWebImage` and its image caching capabilities but it is the app developers responsibility to clear the cache if that is desired |
Overall looks good to me. I tested and it works fine on device. |
@ShadowTourist Did you add the retry operation in |
No, currently image view has no capability of interaction, so retry can be added by |
* feat: 🎸 gif supported by SDWebImage. * feat: 🎸 placeholder and failure support alse README updated * docs: ✏️ update README
* feat: 🎸 gif supported by SDWebImage. * feat: 🎸 placeholder and failure support alse README updated * docs: ✏️ update README Co-authored-by: XiaoYu <33440079+ShadowTourist@users.noreply.github.com>
* feat: 🎸 gif supported by SDWebImage. * feat: 🎸 placeholder and failure support alse README updated * docs: ✏️ update README Co-authored-by: XiaoYu <33440079+ShadowTourist@users.noreply.github.com>
* feat: 🎸 gif supported by SDWebImage. * feat: 🎸 placeholder and failure support alse README updated * docs: ✏️ update README Co-authored-by: XiaoYu <33440079+ShadowTourist@users.noreply.github.com>
* feat: 🎸 gif supported by SDWebImage. * feat: 🎸 placeholder and failure support alse README updated * docs: ✏️ update README Co-authored-by: XiaoYu <33440079+ShadowTourist@users.noreply.github.com>
* feat: 🎸 gif supported by SDWebImage. * feat: 🎸 placeholder and failure support alse README updated * docs: ✏️ update README Co-authored-by: XiaoYu <33440079+ShadowTourist@users.noreply.github.com>
Support gif by
SDWebImage