mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 09:02:44 +02:00
Fix App crashes on [AvatarGenerator imageFromText:withBackgroundColor:]
https://github.com/vector-im/riot-ios/issues/657 Do not call [AvatarGenerator imageFromText:withBackgroundColor:] outside main thread.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user