Skip to content

Commit

Permalink
Show target user avatars for collapsed membership changes
Browse files Browse the repository at this point in the history
This commit switches to displaying the target user's avatar for collapsed membership
changes which addresses the avatar issue reported in #4102.

Depends on: matrix-org/matrix-ios-kit#793

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
  • Loading branch information
Johennes authored and stefanceriu committed Feb 7, 2022
1 parent de775a9 commit 801f406
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,18 @@ - (void)render:(MXKCellData *)cellData
// 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
Expand Down

0 comments on commit 801f406

Please sign in to comment.