Outgoing Messages Refactoring:

- Apply the MatrixKit changes in the MXKAttachment class
This commit is contained in:
giomfo 2016-12-17 19:04:16 +01:00
parent f0052bf4ae
commit 57f7ee4ef9

View file

@ -54,7 +54,18 @@
if (bubbleData.attachment)
{
self.title.text = bubbleData.attachment.originalFileName;
self.date.text = [bubbleData.eventFormatter dateStringFromEvent:bubbleData.attachment.event withTime:NO];
// In case of attachment, the bubble data is composed by only one component.
if (bubbleData.bubbleComponents.count)
{
MXKRoomBubbleComponent *component = bubbleData.bubbleComponents.firstObject;
self.date.text = [bubbleData.eventFormatter dateStringFromEvent:component.event withTime:NO];
}
else
{
self.date.text = nil;
}
self.message.text = bubbleData.senderDisplayName;
self.attachmentImageView.image = nil;