MESSENGER-5575 ACL status event handling in the timeline

This commit is contained in:
Frank Rotermund
2024-03-01 07:25:42 +01:00
parent d07f992659
commit 2867bae23e
16 changed files with 162 additions and 33 deletions
@@ -221,6 +221,12 @@ static BOOL _disableLongPressGestureOnEvent;
// Add a long gesture recognizer on avatar (in order to display for example the member details)
UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(onLongPressGesture:)];
[self.pictureView addGestureRecognizer:longPress];
// bwi #5575 check for ACL picture here. this is done to avoid having differing cell types and sometimes the render method is not called at the proper time
if (bubbleData.tag == RoomBubbleCellDataTagACL) {
self.pictureView.enableInMemoryCache = YES;
self.pictureView.imageView.image = [FederationIconHelper.shared getFederationExclamationMarkImage];
}
}
- (void)setupMessageTextView
@@ -512,15 +518,21 @@ static BOOL _disableLongPressGestureOnEvent;
// Check whether the sender's picture is actually displayed before loading it.
if (self.pictureView)
{
self.pictureView.enableInMemoryCache = YES;
// Consider here the sender avatar is stored unencrypted on Matrix media repo
[self.pictureView setImageURI:bubbleData.senderAvatarUrl
withType:nil
andImageOrientation:UIImageOrientationUp
toFitViewSize:self.pictureView.frame.size
withMethod:MXThumbnailingMethodCrop
previewImage:bubbleData.senderAvatarPlaceholder ? bubbleData.senderAvatarPlaceholder : self.picturePlaceholder
mediaManager:bubbleData.mxSession.mediaManager];
// bwi #5575 check for ACL picture here. this is done to avoid having differing cell types
if (bubbleData.tag == RoomBubbleCellDataTagACL) {
self.pictureView.enableInMemoryCache = YES;
self.pictureView.image = [FederationIconHelper.shared getFederationExclamationMarkImage];
} else {
self.pictureView.enableInMemoryCache = YES;
// Consider here the sender avatar is stored unencrypted on Matrix media repo
[self.pictureView setImageURI:bubbleData.senderAvatarUrl
withType:nil
andImageOrientation:UIImageOrientationUp
toFitViewSize:self.pictureView.frame.size
withMethod:MXThumbnailingMethodCrop
previewImage:bubbleData.senderAvatarPlaceholder ? bubbleData.senderAvatarPlaceholder : self.picturePlaceholder
mediaManager:bubbleData.mxSession.mediaManager];
}
}
if (self.attachmentView && bubbleData.isAttachmentWithThumbnail)