vector-im/element-ios/pull/4148 - Show target user avatars for collapsed membership changes

This commit switches to displaying the target user's avatar for collapsed membership
changes which addresses the avatar issue reported in #4102.

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
This commit is contained in:
Johannes Marbach
2021-03-25 11:01:58 +01:00
committed by Stefan Ceriu
parent 329c163771
commit 891b85f113
2 changed files with 5 additions and 4 deletions
@@ -70,18 +70,18 @@
// Handle user's picture by considering it is stored unencrypted on Matrix media repository
// Use the Riot style placeholder
if (!nextBubbleData.senderAvatarPlaceholder)
if (!nextBubbleData.targetAvatarPlaceholder)
{
nextBubbleData.senderAvatarPlaceholder = [AvatarGenerator generateAvatarForMatrixItem:nextBubbleData.senderId withDisplayName:nextBubbleData.senderDisplayName];
nextBubbleData.targetAvatarPlaceholder = [AvatarGenerator generateAvatarForMatrixItem:nextBubbleData.targetId withDisplayName:nextBubbleData.targetDisplayName];
}
avatarView.enableInMemoryCache = YES;
[avatarView setImageURI:nextBubbleData.senderAvatarUrl
[avatarView setImageURI:nextBubbleData.targetAvatarUrl
withType:nil
andImageOrientation:UIImageOrientationUp
toFitViewSize:avatarView.frame.size
withMethod:MXThumbnailingMethodCrop
previewImage:nextBubbleData.senderAvatarPlaceholder
previewImage:nextBubbleData.targetAvatarPlaceholder
mediaManager:nextBubbleData.mxSession.mediaManager];
// Clear the default background color of a MXKImageView instance