mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-11 18:35:52 +02:00
Merge pull request #4555 from vector-im/doug/4552_fix_attachment_view_mask
Fix image and video thumbnail masks on cell reuse.
This commit is contained in:
@@ -18,6 +18,7 @@ Changes to be released in next version
|
||||
* it's easy for the back button to trigger a leftpanel reveal (#4438).
|
||||
* Show / hide reset button in secrets recovery screen (#4546).
|
||||
* Share Extension: Fix layout when searching (#4258).
|
||||
* Timeline: Fix incorrect crop of media thumbnails (#4552).
|
||||
|
||||
⚠️ API Changes
|
||||
*
|
||||
|
||||
@@ -1039,12 +1039,10 @@ const CGFloat kTypingCellHeight = 24;
|
||||
|
||||
- (void)applyMaskToAttachmentViewOfBubbleCell:(MXKRoomBubbleTableViewCell *)cell
|
||||
{
|
||||
if (cell.attachmentView && !cell.attachmentView.layer.mask)
|
||||
if (cell.attachmentView)
|
||||
{
|
||||
UIBezierPath *myClippingPath = [UIBezierPath bezierPathWithRoundedRect:cell.attachmentView.bounds cornerRadius:6];
|
||||
CAShapeLayer *mask = [CAShapeLayer layer];
|
||||
mask.path = myClippingPath.CGPath;
|
||||
cell.attachmentView.layer.mask = mask;
|
||||
cell.attachmentView.layer.cornerRadius = 6;
|
||||
cell.attachmentView.layer.masksToBounds = YES;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user