mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 07:42:40 +00:00
Merge pull request #1282 from vector-im/riot_657
Fix App crashes on [AvatarGenerator imageFromText:withBackgroundColor:]
This commit is contained in:
commit
b2ef890158
2 changed files with 9 additions and 3 deletions
|
@ -33,9 +33,6 @@ static NSAttributedString *readReceiptVerticalWhitespace = nil;
|
|||
|
||||
if (self)
|
||||
{
|
||||
// Use the vector style placeholder
|
||||
self.senderAvatarPlaceholder = [AvatarGenerator generateAvatarForMatrixItem:self.senderId withDisplayName:self.senderDisplayName];
|
||||
|
||||
// Increase maximum number of components
|
||||
self.maxComponentCount = 20;
|
||||
|
||||
|
|
|
@ -106,6 +106,15 @@
|
|||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
// Do cell data customization that needs to be done before [MXKRoomBubbleTableViewCell render]
|
||||
RoomBubbleCellData *roomBubbleCellData = [self cellDataAtIndex:indexPath.row];
|
||||
|
||||
// Use the Riot style placeholder
|
||||
if (!roomBubbleCellData.senderAvatarPlaceholder)
|
||||
{
|
||||
roomBubbleCellData.senderAvatarPlaceholder = [AvatarGenerator generateAvatarForMatrixItem:roomBubbleCellData.senderId withDisplayName:roomBubbleCellData.senderDisplayName];
|
||||
}
|
||||
|
||||
UITableViewCell *cell = [super tableView:tableView cellForRowAtIndexPath:indexPath];
|
||||
|
||||
// Finalize cell view customization here
|
||||
|
|
Loading…
Reference in a new issue