Handle the room display name and its avatar at the room summary level.

- Update the room display name and its avatar url when the Room Summary is updated on state events change (see `[session: updateRoomSummary: withStateEvents:]`).
- Store the riot display room name and its avatar url in the Room Summary.
- Add a new category `MXRoomSummary+Riot` to handle avatar display.

TODO: Increase file store version in `MXFileStore.h`.
This commit is contained in:
Giom Foret
2017-09-14 16:00:50 +02:00
parent 1f2f139f01
commit 33beaa3dfb
23 changed files with 328 additions and 240 deletions
+1 -3
View File
@@ -17,8 +17,6 @@
#import "FilesSearchCellData.h"
#import "MXRoom+Riot.h"
@implementation FilesSearchCellData
@synthesize roomId, senderDisplayName;
@synthesize searchResult, title, message, date, shouldShowRoomDisplayName, roomDisplayName, attachment, isAttachmentWithThumbnail, attachmentIcon;
@@ -82,7 +80,7 @@
MXRoom *room = [searchDataSource.mxSession roomWithRoomId:roomId];
if (room)
{
roomDisplayName = room.riotDisplayname;
roomDisplayName = room.summary.displayname;
if (!roomDisplayName.length)
{
roomDisplayName = NSLocalizedStringFromTable(@"room_displayname_no_title", @"Vector", nil);