MXKRoomBubbleCellData: Add the hasAttributedTextMessage property to avoid to do recomputation in MXKRoomBubbleCellData.attributedTextMessage when there is no strings to compose

This commit is contained in:
manuroe
2017-07-11 11:47:18 +02:00
parent f362413411
commit 642eacab31
+1 -1
View File
@@ -88,7 +88,7 @@ static NSAttributedString *readReceiptVerticalWhitespace = nil;
{
@synchronized(bubbleComponents)
{
if (!attributedTextMessage.length && bubbleComponents.count)
if (self.hasAttributedTextMessage && !attributedTextMessage.length && bubbleComponents.count)
{
// Attributed text message depends on the room read receipts which must be retrieved on the main thread to prevent us from race conditions.
// Check here the current thread, this is just a sanity check because the attributed text message