Lazy-loading: Fix search display

Use profile info sent in the search response.
This commit is contained in:
manuroe
2018-08-03 17:01:53 +02:00
parent e5bfd110a0
commit 2e622c4b70
2 changed files with 11 additions and 1 deletions

View File

@@ -69,7 +69,12 @@
{
// Highlight the search pattern
[cellData highlightPatternInTextMessage:self.searchText withForegroundColor:kRiotColorGreen andFont:patternFont];
// Use profile information as data to display
MXSearchUserProfile *userProfile = result.context.profileInfo[result.result.sender];
cellData.senderDisplayName = userProfile.displayName;
cellData.senderAvatarUrl = userProfile.avatarUrl;
[cellDataArray insertObject:cellData atIndex:0];
}
}