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

Render sticker events in the timeline #411

Merged
merged 5 commits into from
Apr 3, 2018
Merged

Render sticker events in the timeline #411

merged 5 commits into from
Apr 3, 2018

Conversation

giomfo
Copy link
Member

@giomfo giomfo commented Apr 2, 2018

MXKEventFormatter: support the new `m.sticker` event type

element-hq/element-ios#1819
MXKAttachment: support the new `m.sticker` event type

element-hq/element-ios#1819
- MXKRoomBubbleCellDataStoring: add ìsEncryptedRoom`property
- MXKRoomBubbleTableViewCell: expose `-(void) renderSenderFlair;` method, and add `- (void)prepareRender:(MXKCellData*)cellData;`

API breaks - MXKRoomBubbleTableViewCell: remove 2 useless methods:
`- (void)originalRender:(MXKCellData*)cellData;`
`+ (CGFloat)originalHeightForCellData:(MXKCellData*)cellData withMaximumWidth:(CGFloat)maxWidth;`

element-hq/element-ios#1819
@giomfo giomfo requested a review from manuroe April 2, 2018 22:25
{
_type = MXKAttachmentTypeVideo;

_type = MXKAttachmentTypeSticker;
_thumbnailInfo = eventContent[@"info"][@"thumbnail_info"];
Copy link
Contributor

Choose a reason for hiding this comment

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

We should useMXJSONModelSetXxx helpers to avoid crash because of malformed content.
But that comment is for all this method.

case MXEventTypeSticker:
{
NSString *body;
if ([event.content[@"body"] isKindOfClass:[NSString class]])
Copy link
Contributor

Choose a reason for hiding this comment

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

MXJSONModelSetString does that for you.

- useMXJSONModelSetXxx helpers to avoid crash because of malformed content.

element-hq/element-ios#1819
@giomfo giomfo merged commit 3ae65d9 into develop Apr 3, 2018
@giomfo giomfo deleted the riot_1819 branch April 3, 2018 13:48
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.

None yet

2 participants