BF: e2e devices list not shown (#1782)

This commit is contained in:
manuroe
2018-02-23 17:16:48 +01:00
parent 0ca4570292
commit 773bf9ff1c
2 changed files with 22 additions and 6 deletions
@@ -406,11 +406,28 @@
}
// Retrieve member's devices
[self.mxRoom.mxSession.crypto devicesForUser:self.mxRoomMember.userId complete:^(NSArray<MXDeviceInfo *> *devices) {
devicesArray = devices;
NSString *userId = self.mxRoomMember.userId;
__weak typeof(self) weakSelf = self;
// Reload the full table to take into account a potential change on a device status.
[super updateMemberInfo];
[self.mxRoom.mxSession.crypto downloadKeys:@[userId] forceDownload:NO success:^(MXUsersDevicesMap<MXDeviceInfo *> *usersDevicesInfoMap) {
if (weakSelf)
{
// Restore the status bar
typeof(self) self = weakSelf;
self->devicesArray = usersDevicesInfoMap.map[userId].allValues;
// Reload the full table to take into account a potential change on a device status.
[super updateMemberInfo];
}
} failure:^(NSError *error) {
NSLog(@"[RoomMemberDetailsVC] Crypto failed to download device info for user: %@", userId);
// Notify MatrixKit user
[[NSNotificationCenter defaultCenter] postNotificationName:kMXKErrorNotification object:error];
}];
}