Apply MatrixKit PR changes

This commit is contained in:
ismailgulek
2021-12-09 16:57:43 +03:00
parent 3a6e7a19e2
commit 061f62251b
15 changed files with 161 additions and 69 deletions
@@ -168,7 +168,7 @@ extern NSString *const kMXKRoomBubbleCellUrlItemInteraction;
@property (nonatomic) UIImage *picturePlaceholder;
/**
The list of the temporary subviews that should be removed before reusing the cell (nil by default).
The list of the temporary subviews that should be removed before reusing the cell (empty array by default).
*/
@property (nonatomic) NSMutableArray<UIView*> *tmpSubviews;
@@ -121,6 +121,7 @@ static BOOL _disableLongPressGestureOnEvent;
self.readReceiptsAlignment = ReadReceiptAlignmentLeft;
_allTextHighlighted = NO;
_isAutoAnimatedGif = NO;
_tmpSubviews = [NSMutableArray array];
}
- (void)awakeFromNib
@@ -1005,14 +1006,11 @@ static BOOL _disableLongPressGestureOnEvent;
self.bubbleInfoContainer.hidden = YES;
// Remove temporary subviews
if (self.tmpSubviews)
for (UIView *view in self.tmpSubviews)
{
for (UIView *view in self.tmpSubviews)
{
[view removeFromSuperview];
}
self.tmpSubviews = nil;
[view removeFromSuperview];
}
[self.tmpSubviews removeAllObjects];
// Remove potential overlay subviews
if (self.bubbleOverlayContainer)