Bug Fix: Files search: display the attachment thumbnail

#1135
This commit is contained in:
Giom Foret
2017-04-27 16:55:38 +02:00
parent eabcec4455
commit 2dbb2f4437
+7
View File
@@ -38,6 +38,13 @@
// Title is here the file name stored in event body
title = [event.content[@"body"] isKindOfClass:[NSString class]] ? event.content[@"body"] : nil;
// Check attachment if any
if ([searchDataSource.eventFormatter isSupportedAttachment:event])
{
// Note: event.eventType is equal here to MXEventTypeRoomMessage
attachment = [[MXKAttachment alloc] initWithEvent:event andMatrixSession:searchDataSource.mxSession];
}
// Append the file size if any
if (attachment.contentInfo[@"size"])
{