Apply MatrixKit PR changes

This commit is contained in:
ismailgulek
2021-12-09 16:57:43 +03:00
parent 8093844aea
commit 4fc6c75cf2
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)