stream-chat-android
stream-chat-android copied to clipboard
Add ability to cancel link previews
๐ฏ Goal
Introduce the ability to cancel link previews in the message composer.
๐ Implementation details
- Added a
cancelLinkPreviewmethod toMessageComposerControllerandMessageComposerViewModel. - Updated
ComposerLinkPreviewto accept anonCancelcallback. - When sending a message, if
linkPreviewsis empty,skipEnrichUrlwill be set totrue. - Connected the cancel action in the UI to the new methods.
- ๐จ Breaking change: Updated
ChatComponentFactoryandMessageComposerto pass the newonCancelLinkPreviewClickcallback.
๐จ UI Changes
| Before | After |
|---|---|
๐งช Testing
- Type a link in the message composer
- When the link preview appears, click on the close icon to cancel the link preview
- Send the message
๐ GIF
Please provide a suitable gif that describes your work on this pull request
SDK Size Comparison ๐
| SDK | Before | After | Difference | Status |
|---|---|---|---|---|
| stream-chat-android-client | 3.23 MB | 3.23 MB | 0.00 MB | ๐ข |
| stream-chat-android-offline | 3.46 MB | 3.46 MB | 0.00 MB | ๐ข |
| stream-chat-android-ui-components | 10.55 MB | 10.55 MB | 0.00 MB | ๐ข |
| stream-chat-android-compose | 12.76 MB | 12.77 MB | 0.00 MB | ๐ข |
This pull request has been automatically marked as stale because it has been inactive for 14 days. It will be closed in 7 days if no further activity occurs.
Quality Gate failed
Failed conditions
51.4% Coverage on New Code (required โฅ 80%)
4.4% Duplication on New Code (required โค 3%)
To be done when we can do breaking changes