Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

Use attributed string whitespace for URL previews. #916

Merged
merged 9 commits into from
Sep 29, 2021

Conversation

pixlwave
Copy link
Member

@pixlwave pixlwave commented Sep 28, 2021

Fixes element-hq/element-ios#4896 along side the PR element-hq/element-ios#4924. This PR makes 2 changes:

Adds invalidateTextLayout method to MXKRoomBubbleCellData and replaces all occurrences of setting the attributed string to nil with this method. This was done to make updating the cell's layout more obvious. Any tweaks to the docs/naming totally welcome 🙂

Adds urlPreviewData and showURLPreview properties to MXKBubbleComponent for use from Element (they do nothing by theirselves in Kit). There is one question/comment inline about how this was done.

// limitations under the License.
//

@protocol MXKURLPreviewDataProtocol <NSObject>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can now make classes and protocol in Swift in the Kit

@pixlwave pixlwave merged commit 966722a into develop Sep 29, 2021
@pixlwave pixlwave deleted the doug/4896_url_previews_string_whitespace branch September 29, 2021 15:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use addVerticalWhitespaceToString: for URL Previews
2 participants