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 e823361bd8
commit 772b7ee23e
23 changed files with 328 additions and 240 deletions
+2 -4
View File
@@ -21,8 +21,6 @@
#import "AvatarGenerator.h"
#import "MXRoom+Riot.h"
#import "UsersDevicesViewController.h"
#import "RiotNavigationController.h"
@@ -359,7 +357,7 @@
}
else if (self.mxCall.room)
{
return [AvatarGenerator generateAvatarForMatrixItem:self.mxCall.room.roomId withDisplayName:self.mxCall.room.riotDisplayname size:self.callerImageViewWidthConstraint.constant andFontSize:fontSize];
return [AvatarGenerator generateAvatarForMatrixItem:self.mxCall.room.roomId withDisplayName:self.mxCall.room.summary.displayname size:self.callerImageViewWidthConstraint.constant andFontSize:fontSize];
}
return [UIImage imageNamed:@"placeholder"];
@@ -388,7 +386,7 @@
}
else if (self.mxCall.isConferenceCall)
{
peerDisplayName = self.mxCall.room.riotDisplayname;
peerDisplayName = self.mxCall.room.summary.displayname;
peerAvatarURL = self.mxCall.room.state.avatar;
}